If you squint hard enough, the needs of competitive programming and
those of the recent Java "on-ramp" initiative share something. Namely,
simple, focused functionality that can be used out of the box.
On-ramp, though, does not necessarily have to be performant.

Looking at Scanner, I see that the methods you mentioned haven't
changed since 2007. I wonder if it is possible to improve their
performance to a sufficient degree without introducing too much
complexity, let alone a dedicated class, which, let's be honest, at
face value would look out of place in the JDK.

-Pavel

On Wed, Aug 26, 2026 at 1:27 PM Connor Detroit
<[email protected]> wrote:
>
> Hi, I am a java competitive programmer. In most competitions, parsing input
> using java.util.Scanner is too slow to meet strict time limits. This forces
> participants to manually write out lengthy custom FastScanner classes
> (usually based on BufferedReader and StringTokenizer) for every submission
> Many other competitive programmers and I would like to add a FastScanner so
> we don't have to implement it every time. It would include only the
> essential methods of the standard Scanner (nextInt(), nextLong(), next()),
> making it run much faster.
> I hope this utility can be considered for a future version of Java; I think
> competitive platforms will also update their Java version to the latest one
> Best regards,
> Maxim.

Reply via email to