1.0.6.41: optimized bignum printing
commit98db51588a21d11a6564b0aadb90a412ef112a20
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 9 Jun 2007 18:31:37 +0000 (9 18:31 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 9 Jun 2007 18:31:37 +0000 (9 18:31 +0000)
tree91bee839f62cab1b6101480a159ac175aa0d339d
parent64022c4fef428e19a9c0d59ccddd281d47a84132
1.0.6.41: optimized bignum printing

 * Cache the power-vectors, the computation of which is the real
   bottleneck of bignum printing. So that we don't keep huge bignums
   forever, make GC gently scrub the cache.

 * Rename %OUTPUT-FIXNUM-IN-BASE to %OUTPUT-REASONABLE-INTEGER-IN-BASE
   and %OUTPUT-BIGNUM-IN-BASE to %OUTPUT-HUGE-INTEGER-IN-BASE.

 * The ideal cutoff point between the two algorithms isn't the
   fixnum/bignum divide, but is (on x86/Darwin) around 87 bits -- so
   make the cutoff point N-POSITIVE-FIXNUM-BITS * 3, and hope that
   makes sense on other platforms as well.

 This improves (on x86/Darwin) bignum printing speed in the reasonable
 range by 40%, and by 30% while below 2048 bits. The benefit decreases
 after that, as the GC drops bignums with over 2048 bits from the
 cache -- this doesn't show in a tight benchmarking loop, though.
NEWS
package-data-list.lisp-expr
src/code/gc.lisp
src/code/print.lisp
version.lisp-expr