chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] numbers egg slow?


From: Daishi Kato
Subject: Re: [Chicken-users] numbers egg slow?
Date: Thu, 06 Oct 2005 21:56:08 +0900
User-agent: Wanderlust/2.15.1 (Almost Unreal) Emacs/21.4 Mule/5.0 (SAKAKI)

Hi again,

My interest is to get numbers egg fairly efficient
with only fixnum and flonum arithmetic, compare to without the egg.
Thanks to Alex, we know the overhead of (+) is not that bad.
(It might be possible to improve it, though.)
(expt) however is slow for fixnum arithmetic.
I reviewed the "Bug in the numbers egg" thread again,
understand the background, and am seeking the solution.

So far, trying C_expt every time possible is the one way.
It looks like there is a huge overhead, but it seems not
that huge from the quick trial. Maybe C_expt is pretty fast.
I'm not very confident with this solution, and
for now, separated it from the original (%power),
but it could be merged somehow.
[patch1]

I also noticed %power can be improved by replaceing "*" to "%*",
and there was a bug with the case such as (%power 2 2.1).
[patch2]

Any comments, experiments, are welcome.
Daishi

Attachment: numbers-base.scm.patch1
Description: Binary data

Attachment: numbers-base.scm.patch2
Description: Binary data


reply via email to

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