Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Common Lisp wish list item
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Duane Rettig  
View profile  
 More options Aug 20 2002, 8:01 pm
Newsgroups: comp.lang.lisp
From: Duane Rettig <du...@franz.com>
Date: Wed, 21 Aug 2002 00:00:05 GMT
Local: Tues, Aug 20 2002 8:00 pm
Subject: Re: Common Lisp wish list item

r...@fdy2.demon.co.uk (Robert Swindells) writes:
> Erik Naggum <e...@naggum.no> wrote in message <news:3238779012022126@naggum.no>...
> > I really wish fixnums were the natural machine word.

> PDP-10 Maclisp and Franz Lisp used bibop rather than tag bits to type
> pointers. They shifted down the address to get a page number which was
> used as an index into an array of type values.

> This meant that pointers as well as fixnums could be passed straight
> to foreign code or the operating system.

Well, yes, but fixnums in FranzLisp contained even fewer bits than on
more modern CL implementations (I think that the range was -1023 to
1022, or something like that).  In fact, a section of memory was
explicitly allocated for fixnums, so that no other lisp objects
could be allocated at that location (so that the gc and type-of could
not become confused as to whether or not a bit pattern was a fixnum
or a lisp object of some other type.  And since fixnums have magnitude
and order, it was not just a case of allocating new pages of fixnums
when needed.

The implication to this is that if you cover all of the 32-bit space
with fixnums, there is no longer any room for anything else (neither
other lisp objects nor even program space).

> On a modern CPU with huge penalties for cache misses, tags make more
> sense as they will always be in the cache along with the pointer that
> they type. Needing to load a cacheline for the pointer as well as one
> for part of the type table would really reduce cache efficiency.

The modern CLs do not use memory accesses for fixnums; they are
immediates.  Therefore going back to bibop (in hashed-address form)
for fixnums carries with it an automatic penalty with it, no matter
how fast your cache.

> I have always wished that more effort had been made to try adding
> hardware features to speed up bibop. All of the lispms and the RISC
> chips that I know of (SOAR, SPUR and SPARC) used tags.

> I started building an add-on board to the AtariST to do hardware bibop
> in the 80's, but I got a faster 386 with paged VM soon after and never
> finished it. The 68000 was an ideal CPU for this as it had three
> "function code" pins that would indicate whether a bus cycle was for
> instruction fetch or data read.

The entire reason for modern lisps moving away from special-purpose
hardware is because such hardware cannot compete in the long term.
There is no way for a LispM company to devote close to the same
order of magnitude of manpower to keep the performance curve up with
GP hardware.  However... if you can use existing GP hardware to
advantage:

> In a modern CPU there are usually several spare bits in a page table
> entry. I would like to see some way of using them to store the type
> of objects in that page.

This is a good idea, as long as

 1. The pte bits truly are spare (and are likely to stay that way)

 2a. Your Operating system allows you to use these bits, or
 2b. You are willing to write your own LispOS.

> It would be nice to have a user mode instruction that would treat the
> contents of a source register as a pointer and load the type bits for
> it's page table entry into a destination register.

Most architectures do indeed have such instructions, but some of them
regard such instructions as supervisor-only, and thus only accessible
by a LispOS kernel, or by explicit kernel support in whatever Unix
kernel you are operating under.

--
Duane Rettig    du...@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.