What About the Integer Numbers?
summary
Argues for fast hardware support for proper integers and presents three novel tricks for tagged integers, including the sofa technique that performs a small-integer add with a single branch and the Reno technique that reuses high-bit pointer ranges. Implements them in Koka and compares on ARM64/x64: microbenchmarks sometimes tie, but Pythagorean-triples runs show sofa about 12% faster than older schemes. Concludes these software tricks help but current ISAs poorly support tagged arithmetic and proposes simple ISA extensions.
AI-written summary · about
chapters (12)
- 0:00Integer numbers in programming
- 1:04Real integer support lacking
- 2:31Fast-path techniques for integers
- 3:54Tagging and overflow checks
- 6:03Optimizing integer addition
- 8:17Sofa technique for overflow
- 10:04Reno technique and tricks
- 12:12Benchmarking techniques
- 13:36Performance differences
- 14:58Hardware for faster integers
- 15:40Future directions
- 16:02Q&A
related talks
01h 25mRISC V Bit Manipulation ISA Extension Spec, Hardware, Software
36mSelf-Tagging Numbers
06mLightning Talk: A Compiler Optimization and the 2-Adic Numbers
58mPortable floating-point calculations
38mBASE ISA
01h 11mProgramming language memory models: Problems, solutions, and directions
14mFloat Self-Tagging
15mPushing the Packed SIMD Extension Over the Line: An Update on the Progress of Key RISC...
