freenode/#sbcl - IRC Chatlog
Search
15:43:48
stassats
just produced some vops that compare bignums against zero, having to load length to get the last digit, could just load the first one instead
15:46:07
stassats
(unsigned-byte 64)-p vop would be simpler too, check the length, load the first digit
15:55:33
pkhuong
saturn2: common lisp compilers can't do backward propagation because the standard mandates errors. type mismatches have fully defined error behaviour.
15:57:31
pkhuong
even then i don't think we're allowed to fail upstream of the type mismatch just because we know it's reachable?
15:59:03
pkhuong
I also personally don't care enough about safety-0 to add a pass that only works for unsafe code.
15:59:11
stassats
can reduce some operations, e.g. (truly-the fixnum (truncate double-float)) just check for a fitting float and return garbage otherwise
17:18:39
|3b|
is there any useful equivalent of modular arithmetic for things like (truncate double-float)?
17:19:42
|3b|
i mean where (ldb (byte 64 0) (truncate df)) would be faster, and give defined results
17:22:04
|3b|
no idea there is any way to truncate a double faster even if you know you only want the low N bits of result though
17:52:36
stassats
i need to untangle my understanding of the modarith before i make it even more of a mess
17:53:07
stassats
like, what's the deal with ash-left-mod64 being transformed to (%primitive fast-ash-left-mod64/unsigned=>unsigned integer count)?
17:53:31
stassats
is the problem that we can't restrict a vop on (unsigned-byte 6) because it's not a primitive type?
17:55:38
stassats
(just added a new primitive type today, INTEGER, wonder what are the broader consequences and wouldn't it be better to operate on types)
17:56:23
stassats
not to consolidate all the distinct hacks into something more generic and sensible
21:24:44
stassats
managed to do (declare (fixnum x) ((and unsigned-byte fixnum) n)) (ldb (byte 16 0) (ash x n))
21:35:53
stassats
is it all just to change their type derivers? could lvar-attached type derivers help here?
21:37:09
stassats
that's beyond the scope of today, but i really should investigate lvar-centered optimizations, it might solve a lot of problems