This week, I've gone back to college for my first semester, and continued work as a software developer. And what do I choose to do with my weekend? Benchmark the difference in speed between std::endl and \n in C++ streams. Just FYI, in case anyone cares, endl is orders of magnitude slower than raw \n. Endl always flushes right away, which is fine if you're just writing a few lines, but every single flush makes a system call. Meanwhile if you just do it with \n, the OS can flush the buffer whenever it wants. On my 16-core Ryzen 9, writing to stdout directed to a file took 40 ms with \n, and 1624 with endl. Writing to an ofstream directly, e.g. a text file without redirection, \n took 27 MS and endl took 1585. And now you know that.