3 ms·
JavaScript is typically implemented with small integers that overflow into doubles. Higgs is very effective at eliminating type tests on numerical values. It's
by maximecb 11y ago
JavaScript is typically implemented with small integers that overflow into doubles. Higgs is very effective at eliminating type tests on numerical values. It's difficult to eliminate overflow checks in general, but Higgs uses BBV to do some primitive overflow check elimination that can take care of the "for (i=0;i<n;i++)" case.
- FullyFunctional 11y agoI'll take that as a confirmation of feasibility. Among the languages who integer types default to unbounded, I can think of Python, Erlang, and Scheme (Others? Haskell has both Int and Integer), but it doesn't appear that BBV has been tried outside of Higgs. I guess I could get close by changing something like https://github.com/peterolson/BigInteger.js https://github.com/peterolson/BigInteger.js to use native JavaScript numbers for small integers. One of these days.