freenode/#sbcl - IRC Chatlog
Search
7:42:29
stylewarning
Isn’t this the wrong way to be comparing fixnums and floats? https://github.com/sbcl/sbcl/blob/master/src/code/numbers.lisp#L763
9:01:20
no-defun-allowed
Okay, I've finished implementing the transforms, and they look like they work. Should I send a pull request, or something like that?
10:15:39
no-defun-allowed
Sent an email with a patch, but then I tested my interpreter, and the transform makes it consistently slower; so now I don't know if it's a good idea.
16:41:51
stassats
as bignum floats are just 53-bit integers shifted left, no need to actually create such a bignum
16:51:39
stylewarning
stassats: if I read the code right, “down-converting” to a float would lose precision
16:57:10
stassats
it truncates the float and if it's equal to the integer, than it compares the original float against the truncated one
17:00:22
stassats
stylewarning: i guess you thought that the comparison against the truncated float is the conversion part
17:48:51
stassats
i see about ten different optimization opportunities for ><, need to not lose track of them
17:50:57
stylewarning
I was going to try to write optimizers then lost interest when I found it was 10 layers deep in SBCL
17:52:55
stassats
can't really inline (< ratio float) into anything sensible, but can make it faster than (< ratio (rational float))