Skip to content
Posts Apr 11, 2018 1 min read

Faster Java String Inputs

A high-performance Java input reader class optimized for programming contests, providing fast integer and double parsing with automatic tokenization and buffering options.

Faster Java String Inputs

TurboReader is my solution to the poor input performance of Scanner. All I need from a Reader in most programming contest problems is the ability to read ints and Double, and to read them quickly. That is all this class does, and it also tokenizes those values so that I never have to address empty lines in the text input. I have two versions of this class; a buffered version and an unbuffered version. Judging from the NetBeans performance profiler, the unbuffered version is favored in cases where the program only needs to read a few ints from System.in.

Connected Reading

Related entries

Chosen from shared tags, categories, and nearby section context.

Discovery Layer

Connected Memory

A focused relationship view around this entry, using shared categories and tags.

Categories 0
Tags 0
Posts 0