Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



Seems like it's buffering output, which Python also does. Python is much slower if you flush every write (I get 2.6 MiB/s default, 600 KiB/s with flush=True).

Interestingly, Go is very fast with a 8 KiB buffer (same as Python's), I get 218 MiB/s.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: