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
numbers-base.scm.patch1
Description: Binary data
numbers-base.scm.patch2
Description: Binary data
_______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
