tgockel / json-voorhees

A killer modern C++ library for interacting with JSON.
http://tgockel.github.io/json-voorhees/
Apache License 2.0
128 stars 18 forks source link

Separate integer and decimal token types #96

Closed tgockel closed 4 years ago

tgockel commented 6 years ago

The match_number function is fully aware that it saw a ., e, or E and is capable of emitting something more refined than a token_kind::number (token_kind::integer and token_kind::decimal). This will save parse_number from doing the double scan with characters.find_first_of(".eE"), which might help parsing performance.

tgockel commented 6 years ago

Initial trial.... token_kind_split.txt

Initial results do not show a performance improvement on my PC. Not worth breaking the API if there is no benefit.

tgockel commented 4 years ago

Completed by efc80dc.