sjrd
Joined 13 years ago
Joined 13 years ago
I can't help but do a shameless plug for another recent result in that space: we developed fast algorithms for 64-bit integer divisions (by constants and non-constants) for JavaScript, where you don't even have 64-bit integers to start with. Paper [1] and slides [2] available. The Scala.js compiler uses all of that. The Kotlin/JS compiler recently accepted my PR for the non-constant divisors algorithms.
[1] https://arith2026.org/papers/64-bit%20Integer%20Division%20f...
I do not have perfect pitch, but I could always do what GP's kid does. I am now a pretty good amateur singer.
What matters for this is learning to read the music notation and developing a sense (mostly subconscious) of scales and harmony. Perfect pitch does not help either of those things.
TFA claims it's "new" in 2026, but the current state of the art seems to still be that of 2022.
I bought actual dice like these in 2024 from https://mathsgear.co.uk/collections/dice/products/go-first-d...
So well, is TFA just a big pile of slop?
[1] https://arith2026.org/program.html (2nd keynote)
Technically its type inference is not HM but it's as expressive. In particular it has GADTs and HKTs, which I saw in your docs.
I wonder what you feel is missing from Scala (its .js/Wasm version) that Lumina provides?
Compiler engineers for mostly linear-memory languages tend to only think in terms of SSA, and assume it's the only reasonable way to perform optimizations. That transpires in this particular article: the only difference between an AST and what they call IR is that the latter is SSA-based. So it's like for them something that's not SSA is not a "serious" data structure in which you can perform optimizations, i.e., it can't be an IR.
On the other side, you actually have a bunch of languages, typically GC-based for some reason, whose compilers use expression-based structures. Either in the form of an AST or stack-based IR. These compilers don't lack any optimization opportunities compared to SSA-based ones. However it often happens that compiler authors for those (I am one of them) don't always realize all the optimization set that SSA compilers do, although they could very well be applied in their AST/stack-based IR as well.
We do still maintain this code, although it is deprecated now.
Even with the unrolled tests, we would still keep the table for the decoding operation, I believe. But it's true that it would at the same time provide the normalized value. That could be beneficial.
We have one loop: a binary search in the table of powers of 2 for the double-to-bits conversion. It has a fixed number of iterations. I had tried to unroll it, but that did not perform any better.
I'll have to dig more to understand how they got rid of the comparisons, though.
I wonder whether their implementation would be faster than ours. At the time I wrote our conversions, they beat every previous implementation I was aware of hands down.
[1] https://github.com/scala-js/scala-js/blob/v1.20.2/linker-pri...