News for hackers. Stuff that matters.
Re:Mining JIT traces for missing optimizations with Z3 by gus_massa on Monday July 22, 2024 @08:55AM (#41033825)
I added a few somewhat similar optimization to Racket. The problem are the corner cases.

For example (fixnums are small integer), is it valid to replace

  (if (fixnum? x)
    (fixnum? (abs x))
    true)
with just the constant

  true
?

Try runing a few tests, common unit test and even random test. Did you spot the corner case?

It fails only when x is the most negative fixnum, that is also a very rare case in a real program. (IIRC, the random test suit try to use more of this kind of problematic values.)

There are no comments on this comment yet.