cakeml icon indicating copy to clipboard operation
cakeml copied to clipboard

Missed optimization DIVISION by const

Open ordinarymath opened this issue 8 months ago • 1 comments

Cakeml does not optimize compilation of code that divides by a const into multiplication by magic number. See https://ridiculousfish.com/blog/posts/labor-of-division-episode-iii.html for a more information on how to calculate said magic number.

ordinarymath avatar Apr 26 '25 17:04 ordinarymath

Related to: https://github.com/CakeML/cakeml/issues/246

tanyongkiam avatar Apr 27 '25 15:04 tanyongkiam