From: Juho S. <js...@ik...> - 2004-08-10 12:30:24
|
A couple of other bignum changes: * Lift the bignum-truncate helpers into labels, since there was a lot of (unsigned-byte 32) boxing going on. This also allows replacing the special variables *truncate-x* and *truncate-y* with lexicals. This gives a 50% improvement on some benchmarks. * Implement Kenneth Weber's Accelerated Integer GCD algorithm. This gives about 40% improvement on other benchmarks. This is somewhat messy, especially since the calculations must be done with mutable bignums for performance. Depends on modular non-constant left shifts. Benchmark Reference 0.8.13.32 0.8.13.32-js1 -------------------------------------------------------------------------- BIGNUM/ELEM-100-1000 [ 1.74|0.00] 1.00|0.0018 0.73|0.0036 BIGNUM/ELEM-1000-100 [ 1.28|0.00] 1.00|0.0018 0.46|0.0005 BIGNUM/ELEM-10000-1 [ 1.48|0.01] 1.00|0.0044 0.54|0.0022 BIGNUM/PARI-100-10 [ 0.27|0.00] 1.00|0.0033 0.69|0.0038 BIGNUM/PARI-200-5 [ 0.30|0.00] 1.00|0.0048 0.54|0.0033 PI-DECIMAL/SMALL [ 0.43|0.00] 1.00|0.0043 0.52|0.0016 PI-ATAN [ 2.51|0.00] 1.00|0.0012 0.78|0.0043 PI-RATIOS [ 3.23|0.01] 1.00|0.0026 0.87|0.0028 -- Juho Snellman |