GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Quin (thequinbox@dragonscave.space)'s status on Sunday, 24-Aug-2025 14:28:37 JSTQuinQuin

    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.

    In conversationabout 6 months ago from dragonscave.spacepermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.