Why are Emacs integers so small?
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
Why are Emacs integers so small?         


Author: Davin Pearson
Date: May 6, 2008 01:00

Why are integers in Elisp restricted on some machines to 27 or 28 bits
of accuracy? Wouldn't it be better if integers could be a full 32
bits in size, by borrowing from the following C++ code and translating
it to C and Elisp.

#include
#define null (0)

template
class ptr
{
private:
X* inner_ptr;

public:
ptr()
{
inner_ptr = null;
}
Show full article (3.02Kb)
2 Comments
Re: Why are Emacs integers so small?         


Author: Peter Dyballa
Date: May 6, 2008 10:44

Am 06.05.2008 um 10:00 schrieb Davin Pearson:
> Why are integers in Elisp restricted on some machines to 27 or 28 bits
> of accuracy?

Because some bits (4) are used internally for Lisp purposes. In this
millenium it's so easy to migrate to a useful processor with 64 or
more bits and an operating system that supports these wealth that I
don't see much sense in complaining.

--
Greetings

Pete

The light at the end of the tunnel has been turned off due to budget
cuts.
no comments
Re: Why are Emacs integers so small?         


Author: David Kastrup
Date: May 6, 2008 15:41

Peter Dyballa writes:
> Am 06.05.2008 um 10:00 schrieb Davin Pearson:
>
>> Why are integers in Elisp restricted on some machines to 27 or 28 bits
>> of accuracy?
>
>
> Because some bits (4) are used internally for Lisp purposes. In this
> millenium it's so easy to migrate to a useful processor with 64 or
> more bits and an operating system that supports these wealth that I
> don't see much sense in complaining.

It would be easily possible to use 31 bit integers and use 5 bits for
Lisp purposes (when the lowest bit is 1, we are talking about integers,
or a scheme like that).

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
no comments

RELATED THREADS
SubjectArticles qty Group
Re: .emacs in the Windows version of Emacsgnu.emacs.help ·