Optimized number parsing.