[gambit-list] Patch to speed bignum division in common case

Marc Feeley feeley at iro.umontreal.ca
Tue Oct 1 13:38:41 EDT 2013


Thanks for the patch.  It is not committed and pushed to the repo.

What was the problem with your first patch?

Can you send me your pidigits2-gambit.scm file?  It might make an interesting parallel benchmark.

Marc

On 2013-09-30, at 8:52 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:

> 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
> 
> <_num-scm.patch><test-quotient.scm>




More information about the Gambit-list mailing list