~/talk

Measuring the Overhead of iostreams: What Is the Difference?

Talkat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp]
name:Ahto Truu
links:none on file
slides:none on file

A simple harness generates 1–2 million lines (10–40 million integers) and runs gcc 9.2 -O2 binaries on Ubuntu to compare C stdio vs C++ iostreams with variations: sync_with_stdio(false), untie(cin), and endl vs '\n'. Default iostreams run about 8–11× slower than stdio on files and pipes; disabling sync and untie drops the gap to roughly 1.5–2× and in one config even yields a 10–20% win. The expected big penalty from using endl mostly does not appear except in the fully optimized case.

AI-written summary · about

  1. 0:00Start
  2. 0:57Programming Competitions
  3. 3:14How Does the Ranking Work?
  4. 4:40Algorithmic Complexity
  5. 8:30Concrete Complexity
  6. 10:16Test Setup
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.