[gambit-list] Patch to speed bignum division in common case
Bradley Lucier
lucier at math.purdue.edu
Mon Sep 30 20:52:49 EDT 2013
On 09/25/2013 09:58 PM, Bradley Lucier wrote:
>
>
> The problem is with -m32, not -m64. I'll look at it, sorry.
Here is a fix. It passes "make check" on both 32-bit and 64-bit x86.
I've included a little quotient "torture test" in case you want to
incorporate it into error.scm.
Brad
The times for 32-bit on my Core i7:
Original:
time ./pidigits2-gambit > /dev/null
(time (digits 10000))
13233 ms real time
13192 ms cpu time (13040 user, 152 system)
2840 collections accounting for 266 ms real time (224 user, 4 system)
12119389176 bytes allocated
192981 minor faults
no major faults
13.040u 0.152s 0:13.23 99.6% 0+0k 0+0io 0pf+0w
New:
time ./pidigits2-gambit > /dev/null
(time (digits 10000))
11236 ms real time
11200 ms cpu time (11108 user, 92 system)
2300 collections accounting for 216 ms real time (232 user, 0 system)
9808248640 bytes allocated
127024 minor faults
no major faults
11.120u 0.092s 0:11.24 99.7% 0+0k 0+0io 0pf+0w
For 64-bit:
Original:
time ./pidigits2-gambit > /dev/null
(time (digits 10000))
5632 ms real time
5612 ms cpu time (5552 user, 60 system)
2965 collections accounting for 203 ms real time (212 user, 4 system)
12173461160 bytes allocated
59591 minor faults
no major faults
5.556u 0.060s 0:05.63 99.6% 0+0k 0+0io 0pf+0w
New:
time ./pidigits2-gambit > /dev/null
(time (digits 10000))
4645 ms real time
4632 ms cpu time (4592 user, 40 system)
2389 collections accounting for 159 ms real time (140 user, 0 system)
9831319240 bytes allocated
35307 minor faults
no major faults
4.592u 0.040s 0:04.64 99.7% 0+0k 0+0io 0pf+0w
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _num-scm.patch
Type: text/x-patch
Size: 15179 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130930/41cce4af/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-quotient.scm
Type: text/x-scheme
Size: 569 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130930/41cce4af/attachment-0001.bin>
More information about the Gambit-list
mailing list