• Evan Shaw's avatar
    big: Add Lsh and Value; convert pidigits to use big · 76cbbc8a
    Evan Shaw authored
    This yields a pretty significant performance boost to pidigits and there are still some improvements to be made. Here are my numbers:
    
    amd64 w/ bignum:
    pidigits 10000
            gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
            gc pidigits     22.92u 0.02s 22.97r
            gc_B pidigits   22.62u 0.00s 22.65r
    
    amd64 w/ big:
    pidigits 10000
            gcc -O2 pidigits.c -lgmp        2.09u 0.02s 2.11r
            gc pidigits     12.68u 0.04s 12.72r
            gc_B pidigits   12.71u 0.03s 12.75r
    
    386 w/ bignum:
    pidigits 10000
            gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.09r
            gc pidigits     44.30u 0.01s 44.35r
            gc_B pidigits   44.29u 0.03s 44.35r
    
    386 w/ big:
    pidigits 10000
            gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
            gc pidigits     22.70u 0.06s 22.79r
            gc_B pidigits   22.80u 0.09s 22.91r
    
    R=rsc, gri
    CC=golang-dev
    https://golang.org/cl/881050
    76cbbc8a
Name
Last commit
Last update
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
pkg Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...