Ralf Hemmecke wrote:
> 
> didn't you say that SingleInteger and Integer have the same (LISP)
> representation if the range is in -2^n .. 2^n (n=23?).
> On a 64 bit machine the n is probably bigger.
> 
> But anyway, wouldn't be Rep==Integer in HashState do the job of being OK
> for 32 and 64 bit machines if we only access the SingleInteger range of
> a 64 bit machine?

>From correctness point of view Integer as Rep is fine.  OTOH you
get performace drop for two reasons:
1) Lisp compiler has  to implement basic operations via
   library calls (because it can now longer assume that simple
   machine operation will do the job)
2) if you exceed range of SingleInteger you pay costs of
   memory allocation.

For best performance 'combine' should be implemented as
a Lisp macro (then it can be inlined).

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to