[Top][All Lists]

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

Re: [h-e-w] heading a large file

From: John S. Yates, Jr.
Subject: Re: [h-e-w] heading a large file
Date: Thu, 15 Jan 2004 22:27:25 -0500

On Wed, 07 Jan 2004 18:43:03 -0500, you wrote:

>MJ Chan <address@hidden> writes:
>> Is it 30 bits or 29 bits in CVS version? The CVS version that I'm
>> running has GCTYPEBITS set to 3, which makes it 29 bits for VALBITS. 
>> With 29-bit emacs integers, I am able to open large files, and the
>> max. buffer size is doubled. This is a big improvement for me. Thank
>> everyone who made it happen. 
>It was Stefan Monnier, I thought he had managed to get an extra bit
>for integers in addition to the GCTYPEBITS change above, but maybe I
>am wrong.

I have not looked at any version of the elisp interpreter.  But this
exchange took me back 15 years to a time when I added explicit tag
support to Apollo Computer's DN10K risc instruction set.  I worked
with some folks from Lucid to optimize operations on small integers
while still detecting non-smallint types.  The result is described
in US patent 5045992.

Quoting from the "Background of the Invention Section":

  The Lisp universe is traditionally thought of as made up of
  atoms and list cells. Although this view is a correct semantic
  model, in real Lisp applications, computation on small integers
  is so common they are considered a special case. Thus, at the
  lowest level of implementation, there are actually three kinds
  of objects in the Lisp universe: 

  CONS-CELLS: the 2 pointer cells from which lists are constructed; 

  SMALL-INTS: small signed integers, about the size of a pointer
              bereft of its tag bits; and 

  OTHER:      blocks of storage with extended tags. 

  A typical assignment of meaning to the three low bit tag values
  is shown as follows: 

    000: 30 bit even integer (29 high order bits concatenated with
         the most significant tag bit (=0) 

    001: pointer escape (tagged non-arithmetic block or storage) 

    010: number escape (floating or infinite precision fixed-point) 

    011: pointer to cons cell 

    100: 30 bit odd integer (29 high order bits concatenated with
         the most significant tag bit (=1) 

    101: symbol escape (property list, value cell, etc.) 

    110: other immediate escape (i.e., non-integer; e.g.: single

    111: unused (forwarding-pointer if supported by hardware) 

I claim to contribution to this encoding.  I am only pointing out
that Lucid's commercialized Lisp implementation used exactly this
3 bits tagging scheme to achieved 30 bit of smallint precision.

John Yates
40 Pine Street
Needham, MA 02492
781 444-2899

reply via email to

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