Dramatically improve the performance of EXACT->INEXACT on ratnums and
(EXPT 2 x). Slightly improve INTEGER-ROUND. These changes require
two new primitives implemented in microcode 11.158.
Here are the results for EXACT->INEXACT. These tests were run by
calling EXACT->INEXACT on a list of 100000 randomly-generated ratnums.
The numerator and denominator were each chosen using a modulus of
(EXPT 2 64), discarding zero denominators and integer quotients.
The machine was a dual Pentium Pro 200MHz / 512kB cache, 128MB RAM,
running SMP Linux 2.0.26 and libc 5.4.20. Scheme was run using the
runtime.com band and a heap of 4000. The machine was otherwise
quiescent.
Results for old EXACT->INEXACT:
process time: 1750 (1470 RUN + 280 GC); real time: 37350
process time: 1000 (780 RUN + 220 GC); real time: 37359
process time: 900 (900 RUN + 0 GC); real time: 37345
process time: 2460 (2060 RUN + 400 GC); real time: 37370
average real time: 37356 msec
Results for new EXACT->INEXACT:
process time: 580 (580 RUN + 0 GC); real time: 5825
process time: 240 (240 RUN + 0 GC); real time: 5480
process time: 910 (910 RUN + 0 GC); real time: 5450
process time: 840 (540 RUN + 300 GC); real time: 5770
average real time: 5631 msec
Average improvement is a factor of 6.6 in speed.