Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!hplabs!sdcrdcf!darrelj From: darrelj@sdcrdcf.UUCP (Darrel VanBuer) Newsgroups: comp.lang.lisp Subject: Re: GC and time critical code? (use of numbers) Message-ID: <5243@sdcrdcf.UUCP> Date: 19 Apr 88 15:47:52 GMT References: <452@cvaxa.sussex.ac.uk> Reply-To: darrelj@sdcrdcf.UUCP (Darrel VanBuer) Organization: Unisys - System Development Group, Santa Monica Lines: 24 Keywords: GC, time-critical, number representation, Poplog The range of numbers varies quite widely between different Lisp implementations. There are three catagories in many Lisps: SMALLP -- stored in a reserved range of (fake) pointers, these only cost a few cycles to add/subtract/shift to/from naked number FIXP -- a full machine word with a pointer to it. 32 to 36 bits on most. BIGNUM -- usually open ended, often implemented with arrays or lists Implementation SMALLP FIXP BIGNUM ============== ====== ==== ====== Interlisp 10 -1536..1535 36 bits no Interlisp VAX -2^30..2^30-1 no no Interlisp D -65535..65535 32 bits yes Interlisp 360 24 bits 32 bits no CWIC 360 -4096..12287 32 bits no I have also seen a few implementations with NO smallp. Commonlisp only talks of FIXNUM and BIGNUM, but discourages knowing the dividing line since it is unportable (though it suggests that fixnums should provide at least 16 bits), and is even vague about how much of an efficiency difference there is (or how you would split up the three catagories into the two Commonlisp sets). -- Darrel J. Van Buer, PhD; unisys; 2400 Colorado Ave; Santa Monica, CA 90406 (213)829-7511 x5449 KI6VY darrel@CAM.UNISYS.COM or ...{allegra,burdvax,cbosgd,hplabs,ihnp4}!sdcrdcf!darrelj