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 
<pe...@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