On Sun, Dec 22, 2013 at 04:42:36PM +0100, [email protected] wrote: > You are right - it does not make much sense to work wuch such calculation. I > was asking the question because I did not have any other idea how to store > base36 characters for computation other than string - except with > vectors/lists > maybe.
u8vectors would probably be the fastest, but with an overhead of 2 bits per digit because 36 can be represented in 6 bits. There are always 2 unused bits for every octet. The same is true for string representation. If you use regular vectors or lists storing one digit in each slot, the overhead would depend on the platform: on a 32-bit platform you'd be wasting 24 bits (only 30 bits are used for actual number representation), on a 64-bit platform that would be 56 bits. Cheers, Peter -- http://www.more-magic.net _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
