Subject: Re: (setf (readtable-case *readtable*) :invert) completely preserves symbol case in CMUCL From: Erik Naggum <erik@naggum.net> Date: Mon, 27 May 2002 01:10:18 GMT Newsgroups: comp.lang.lisp Message-ID: <3231450610377839@naggum.net> * Adam Warner | Shouldn't it be (check-type string string)? Yes. I stuffed that line in just prior to posting. I keep making that mistake, yet I think it seems more correct to use the quoted type for the type, not just an unevaluated expression. | And an optimisation question: Doesn't this declare index and length to be | greater than 16-bit unsigned integers? Yes, but this is actually irrelevant, since the point was only to limit these things to less than array-dimension-limit, which it is annoyingly verbose to do. I also keep misremembering that (integer 0 1) and (integer (-1) (2)) are equivalent. I guess I believe upper limits should be exclusive because they are everywhere else in the language. It is surprisingly hard to learn things you believe should be different from what they are. Thanks for reminding me of these things. Just goes to show what happens when I post code I had not visited for weeks and had just rattled off at the time -- it was just useful to me at the time. | This probably causes the compiler to optimise using 32-bit integers. Well, we do not generally have 32-bit integers in Common Lisp systems on 32-bit hardware. but at least this makes it use more than 16 bits. It should have been only 65535, of course. A better way to specify this is (unsigned-byte 16). | On my computer it seems to make no speed difference, probably because | 32-bit integers are the minimum size used on 32-bit machines. (integer-length (- most-positive-fixnum most-negative-fixnum)) is usually less than 32, and can be as low as 16. A quick survey finds that Allegro CL and CMUCL have 30-bit signed fixnums, CLISP has 25-bit, and LispWorks 24-bit, all on a 32-bit Linux system. -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief. 70 percent of American adults do not understand the scientific process.