freenode/#sbcl - IRC Chatlog
Search
14:47:12
pfdietz
It's interesting that the ML page on Wikipedia does not mention the connection to LCF (which I knew about, having been at Cornell around that time.)
23:28:28
|3b|
what's the most efficient sbcl-specific way to convert a (unsigned-byte 32) to (signed-byte 32) with same bits?
23:48:33
stassats
let's agree you use this, and i motivate myself to finally add multi-combination transforms
0:14:46
stassats
(defun foo (x) (declare ((unsigned-byte 32) x) (optimize speed)) (sb-kernel:make-single-float (truly-the (signed-byte 32) x)))
0:24:10
stassats
(sb-kernel:%make-lisp-obj (logior (ash x 32) sb-vm:single-float-widetag)) for tagging ;; don't use it
0:26:55
|3b|
(and without a type check, mask-signed-field is a full call, so i probably want the check)
0:27:12
stassats
what about (sb-kernel:%make-lisp-obj (logior (ash x 32) sb-vm:single-float-widetag)) ?
0:30:25
stassats
that assumes it's going to be tagged, not stuffed into array, although, stuffing into an array should also not need FP instructions
0:30:42
|3b|
i think that's actually worse, since the function has an ftype to return single-float and it can't tell make-lisp-obj returns a single-float
0:32:19
stassats
ok, don't use that actual form, but that what make-single-float should expand into in that case
0:35:38
|3b|
ok, i'll go with (sb-kernel:make-single-float (sb-c::mask-signed-field 32 (the (unsigned-byte 32) bits)))
0:35:54
|3b|
(sb-kernel:make-single-float (sb-ext:truly-the (signed-byte 32) (the (unsigned-byte 32) bits))) is a bit ugly (and longer) :)
0:39:58
stassats
ok, make-single-float to tagged single-float is used within sbcl itself, so i'll optimize that case
0:52:04
stassats
ok, i have a sb-kernel:make-single-float variant that takes up tagged fixnums and returns tagged floats, without untagging
1:00:13
stassats
it can figure that out, but that doesn't help it to get rid of mask-signed-field itself
1:02:32
stassats
mask-signed-field kinda feels safer, although on x86-64, the truly is going to work
1:57:38
exit70[m]
hi, curious how is the binary releases in http://sbcl.sourceforge.net/platform-table.html got updated?