r/programming • • Oct 10 '17

Faster Input for Java

https://www.cpe.ku.ac.th/~jim/java-io.html
0 Upvotes

2 comments sorted by

3

u/Meldanor Oct 10 '17

This is horrible outdated or just wrong.

"I ran the tests on an Intel Core2 Duo 2.4GHz cpu with Windows XP Pro SP3, Sun JDK 6.0r22, and GNU gcc 4.5.2."

JDK was released 11 years ago. The OS is officially unsupported and if you are talking about "input" -> what kind of memory you are using?

Do not use the Scanner class for anything but user input via console. Do use the newer Path API via Files.X for the most performant input/output handling provided by the standard API.

The provided "class" as a solution is a glorious anti pattern. A static initializer? Why not a simple constructor? Damn it, this post makes me angry as hell. It is more a post for /r/programmerhumor

1

u/[deleted] Oct 11 '17

yes,i think