News for hackers. Stuff that matters.
Re:How fast can a BufferedReader read lines in Java? by ubu7737 on Saturday July 27, 2019 @11:58AM (#20542596)
Java NIO does exactly what you describe. IO is chunked optimally, the entire buffer is pulled, the API exposes a select() mechanism just like any libc, and the user is expected to frame its own received data.

edit: Lemire is showing a lack of what Fowler describes as "mechanical sympathy".

https://martinfowler.com/articles/lmax.html#QueuesAndTheirLa...

Re:How fast can a BufferedReader read lines in Java? by Matthias247 on Saturday July 27, 2019 @05:28PM (#20544293)
A bit of nitpicking on that: Even Javas nio API isn't very efficient. select() introduces a ton of garbage due to dynamically allocating lists for selected keys, and keys have a lot of synchronization overhead. That's why frameworks like Netty gained a lot of performance by building their own selectors using JNI.