Complete reimplementation of the number parser. New parser is 3.5
times as fast as the old one (see data below), and includes the
contribution due to the improved EXACT->INEXACT.
New switch FLONUM-PARSER-FAST? allows the number parser to sacrifice
accuracy for performance, and gains another factor of 2.4 in
performance on flonums.
----------------------------------------------------------------------
Tests performed with a list of 100000 randomly-generated strings. The
strings were generated by "test-numpar.scm", which implements the R4RS
number BNF, so the strings are arbitrary numeric syntax.
This is a test of general number-reading performance.
Results for old exact->inexact and old string->number:
process time: 9690 (9060 RUN + 630 GC); real time: 9690
process time: 9460 (8830 RUN + 630 GC); real time: 9458
process time: 9450 (8820 RUN + 630 GC); real time: 9451
process time: 9460 (8830 RUN + 630 GC); real time: 9456
average real time: 9514 msec
Results for new exact->inexact and new string->number:
process time: 2800 (2800 RUN + 0 GC); real time: 2800
process time: 2790 (2790 RUN + 0 GC); real time: 2786
process time: 2700 (2700 RUN + 0 GC); real time: 2703
process time: 2680 (2680 RUN + 0 GC); real time: 2686
average real time: 2744 msec
Average improvement is a factor of 3.5 in speed.