[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improve "busy" numeric code's performance [was: Re: Big Integers]
From: |
Peter Bex |
Subject: |
Re: Improve "busy" numeric code's performance [was: Re: Big Integers] |
Date: |
Wed, 22 May 2024 16:54:45 +0200 |
On Wed, May 22, 2024 at 02:42:38PM +0200, Peter Bex wrote:
> Attached are two patches, one which has this bigger improvement, and
> another which is a minor improvement which translates to shaving about
> a second of runtime off your program (at least on my machine).
The minor patch was incorrect. I copied some code from C_s_a_i_remainder
into C_s_a_i_modulo inline, but that code had an early return for the
case where both numbers are flonums. This code needs to be adjusted to
handle the case when the arguments aren't of the same sign, just like we
do after returning from integer_divrem().
I'm sending both patches again for your convenience. The second patch
has a fix for the aforementioned issue.
Cheers,
Peter
0001-Don-t-free-the-memory-for-the-scratchspace-on-minor-.patch
Description: Text document
0002-Call-integer_divrem-straight-from-the-modulo-operati.patch
Description: Text document