I am reading a large file from disk. This file contains only digits encoded as plain old ASCII. At the moment, I am reading the pieces, and then doing something like this:
byte[] token;
In other words, I convert to String and then parse the string into Integer. I would like to know if there is a way to use fast operations like shifting and binary arithmetic instead?
I suspect that this can be done faster. For example, raw bytes for numbers 1,2,3 are 49.50.51. Any ideas for hacks?
source share