LowLevelParser: perform fewer comparisons

As suggested by Thomas, let's perform one less comparison for smaller numbers.
This cuts the time spent in getUInt from 0.70% of total to 0.65% :).
Preallocate the memory when possible