chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve "busy" numeric code's performance [was: Re: Big Integers]


From: T.D. Telford
Subject: Re: Improve "busy" numeric code's performance [was: Re: Big Integers]
Date: Thu, 23 May 2024 00:29:21 +0000 (UTC)

With patch 0001 the elapsed time went from 33.7 seconds to 24.5 seconds.

With patch 0002 the elapsed time went to 23.4 seconds.

Good work -- Doug

On Wednesday, May 22, 2024 at 08:54:49 AM MDT, Peter Bex <peter@more-magic.net> wrote:


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]