From ... From: Erik Naggum Subject: Re: Waving the lambda flag again (was: Constants and DEFCONSTANT) Date: 1999/04/09 Message-ID: <3132650111013059@naggum.no>#1/1 X-Deja-AN: 464413371 References: <7dr23c$2re$1@shell5.ba.best.com> <3131961221139730@naggum.no> <4niubflwhf.fsf@rtp.ericsson.se> <41UM2.19154$134.197089@tor-nn1.netcom.ca> <3132042770550791@naggum.no> <3132050414299555@naggum.no> <3132487825915707@naggum.no> <4npv5guv18.fsf@rtp.ericsson.se> <3132514507164896@naggum.no> <7ej0ia$l2v$1@spitting-spider.aracnet.com> <3132593479131324@naggum.no> <7ej8ov$o5c$1@spitting-spider.aracnet.com> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * pvaneynd@mail.inthan.be (Peter Van Eynde) | I meant that we can waste space on the fields that require less than 8 | bits. Instead of packing them together as close as possible. On the x86 | at least (and on modern Alpha's I believe, but I'm no expert, I just keep | dreaming of buying one) the | extract-8bits-on-a-8bit-boundary-from-that-register[1] commands are | pretty common and fast[2], so this would give a speed bonus. this presupposes a number of hard-to-presuppose things. fixnums have to live in the same 32-bit space as addresses. first, this frequently means that some least or most significant bits are used for type information, and this impacts the 8-bit boundaries. second, even if you could extract a byte with a register operation, the same considerations as for the whole fixnum would apply to the result. in practice, it's easier to shift. since we're dealing with Intels and I'm sure everybody has Pentium II by now :), a shift immediate is only one µop, and if you interleave the shifts, masks, and the register transfers or memory writes, you can fill the decoder and exploit the entire pipeline; you would save nothing by using other sequences of µops that also filled the pipeline, so there is nothing to be gained by handling 8-bit "shifts" specially. I don't think we want to get into the details, though... #:Erik