Honestly, it seems that nearly everyone here is missing his point.<p>Some of the blame for that probably lies with his headline choice, but he clearly states at the end of this post:<p>"""
This is not the best that Java can do: Java can ingest data much faster. However, my results suggest that on modern systems, Java file parsing might be frequently processor-bound, as opposed to system bound. That is, you can buy much better disks and network cards, and your system won’t go any faster. Unless, of course, you have really good Java engineers.<p>Many firms probably just throw more hardware at the problem.
"""<p>It's not <i>about</i> this piece of code. It's not even about Java In the previous post he mentions at the start of this one, he pointed out:<p>"""
These results suggest that reading a text file in C++ could be CPU bound in that sense that buying an even faster disk would not speed up your single-threaded throughput.
"""<p>So, I take his point to be that one shouldn't make assumptions about performance. Rough performance scales -- such as have been posted here many times (e.g. [1]) -- make great rules of thumb for implementation choices or as a guide for where to look first for bottlenecks. To optimize in the <i></i>real world<i></i>, though, you're best served using <i></i>real measurements<i></i>.<p>[1] <a href="https://www.prowesscorp.com/computer-latency-at-a-human-scale/" rel="nofollow">https://www.prowesscorp.com/computer-latency-at-a-human-scal...</a>