[Nickle] log is still (again?) deathly slow
Sat, 23 Nov 2002 16:46:41 -0800
Around 2 o'clock on Nov 23, Bart Massey wrote:
> time nickle -e 'for (int i = 0; i < 10000; i++) log(0.05);'
The default mantissa (256) bits makes this rather slow. Try a smaller
$ time nickle -e 'for (int i = 0; i < 10000; i++) log(imprecise(0.05,50));'
$ time nickle -e 'for (int i = 0; i < 10000; i++) log(imprecise(0.05,100));'
Log is (currently) implemented as a polynomial kernel which yields 50 bits
and newtons method which doubles precision each time around the loop, but
that loop calls exp which is no speed daemon.
Keith Packard XFree86 Core Team HP Cambridge Research Lab