Re: declare 64 bit integers?
- From: adejneka@xxxxxxxxx
- Date: Sat, 29 Sep 2007 05:00:23 -0700
On Sep 29, 12:56 pm, "Alex Mizrahi" <udode...@xxxxxxxxxxxxxxxxxxxxx>
wrote:
[for SBCL on x86_64]
so fixnums are just 61 bit wide, that's not interesting. how to declare
64-bit interger value?
You can work with unboxed 64 bit integers in the same way as with
unboxed floats: do not store them into a universal storage (e.g. a
list or a non-specialized vector), do not pass as arguments to a
global function, and do not return. For example:
(defun checksum (vector result)
(declare (type (simple-array (unsigned-byte 64) (*)) vector)
(type (simple-array (unsigned-byte 64) ()) result))
(loop for x of-type (unsigned-byte 64) across vector
for s of-type (unsigned-byte 64) = x then (logxor s x)
finally (setf (aref result) s))
result)
.
- References:
- declare 64 bit integers?
- From: jrwats
- Re: declare 64 bit integers?
- From: Alex Mizrahi
- Re: declare 64 bit integers?
- From: Nathan Froyd
- Re: declare 64 bit integers?
- From: Alex Mizrahi
- declare 64 bit integers?
- Prev by Date: Re: declare 64 bit integers?
- Next by Date: Re: [OT] Free Software Strikes Again?
- Previous by thread: Re: declare 64 bit integers?
- Next by thread: How to implement heap as a binary tree in lisp?
- Index(es):