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

*To*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Subject*: Re: arithmetic issues*From*: Alan Watson <a.watson@xxxxxxxxxxxxxxxx>*Date*: Sat, 22 Oct 2005 20:39:01 -0500*Cc*: srfi-77@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <20051022231452.C14A61B77BB@xxxxxxxxxxxxxxxxxxxxx>*Organization*: Centro de Radioastronomía y Astrofísica UNAM*References*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx> <4359872B.8070401@xxxxxxxxxxxxxxxx> <20051022231452.C14A61B77BB@xxxxxxxxxxxxxxxxxxxxx>*User-agent*: Mozilla Thunderbird 1.0 (X11/20050317)

Aubrey Jaffer wrote:

| > Flonums often are the most difficult feature to port to new| > architectures.|| Why do you say that?From the experience of porting SCM to dozens of C compilers.

| That is, I would mandate only unlimited size integers in the core. | The rest of the tower should be moved to the library. Moving 1/3 or more of an implementation to a library isn't always practical. libm may not be dynamically loadable; in which case the executable must carry around the math libraries, even when they are not used. One can end up having two copies of many subroutines and some subsystems like garbage collection.

[In SCM] The arithmetic subrs test first for INUMs, then bignums, then flonums. The type dispatch for bignums and flonums is very similar. It would be good to find what causes the difference.

> I tested SCM and SCMLIT (fixnums only), both compiled with gcc -O3, > computing 2000 digits of pi 4 digits at a time on a Pentium 4 3.00GHz. > The benchmark uses only small integers. > > SCM took 5330.ms, while SCMLIT took 3330.ms, a substantial savings.

Regards, Alan -- Dr Alan Watson Centro de Radioastronomía y Astrofísica Universidad Astronómico Nacional de México

**Follow-Ups**:**Re: arithmetic issues***From:*Aubrey Jaffer

**References**:**arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*Alan Watson

**Re: arithmetic issues***From:*Aubrey Jaffer

- Prev by Date:
**Re: +nan.0 problems** - Next by Date:
**Re: arithmetic issues** - Previous by thread:
**Re: arithmetic issues** - Next by thread:
**Re: arithmetic issues** - Index(es):