Re: big strings

"Walter C. Pelissero" <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
Raymond Toy (RT/EUS) writes:
 > >>>>> "WP" == Walter C Pelissero <[email protected]> writes:
 > 
 >     WP> Raymond Toy (RT/EUS) writes:
 >     >> Thanks for the replacement.  The only possible issue with the
 >     >> replacement would be performance.  BIT-BASH-COPY tries pretty hard
 >     >> to do word copies.  And BIT-BASH-COPY is intended to be able to
 >     >> copy arbitrary bit strings.  I don't know why it's limited to
 >     >> (unsigned-byte 27) offsets.  Perhaps to make sure the bit index
 >     >> stays as a 32-bit int?
 > 
 >     WP> This is what came to mind reading the error.  What I didn't understand
 >     WP> is why we get an error at all, being:
 > 
 >     WP>  2^27 > 17M   (way larger)
 > 
 > But the 17M is converted to a bit index and the bit index is greater
 > than 2^27.

Sorry, I failed to grasp the meaning of the "bit-" part.

 > As an experiment, I changed the constant max-bits in
 > code/bit-bash.lisp from 2^27 to most-positive-fixnum.  The comment
 > there says it's the maximum number of bits that can be delt [sic] with
 > during a single call.

I suppose one could compare the generated code (disassembling it) and
see if there is any degradation.

 > I don't see why it can't really handle at least
 > most-positive-fixnum number of bits or even #xffffffff number of
 > bits.

[I assume you meant 2^32 and not 2^2^32]

Wouldn't a 32-bit integer be too big to fit in a "simple" Lisp object
thus requiring a further indirection?


-- 
walter pelissero
http://www.pelissero.de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.