Beating the compiler at signed 32-bit division
Comments on “Beating the compiler at signed 32-bit division”
Claim-checked. Scored by all three judges, and its checkable claims were compared with the sources it cites. How far stories are checked
Daniel Lemire shows that compilers leave a bit unused when dividing signed 32-bit integers by constants on 64-bit CPUs. A 33-bit multiplier fits in a signed 64-bit product, so the correction step can be dropped, which affects about 38% of divisors from 3 to 1000. In his benchmarks, latency falls from 10 to 8 cycles on Intel, and clang throughput improves over 20%. His fastmod 0.2.0 removes a sign branch, running 4x faster than 0.1.0 on Intel. These are single-author measurements on one Intel and one Apple chip.
Why it ranked
No. 15 of 59 with a score of 0.62. The panel rated it highest on technical depth (0.96) and new information (0.92), lowest on significance (0.47). Placed No. 15, No. 23 by score alone: the placement terms moved other stories past it.
- AI judgeJudge 2claude-haiku-5-5
- Detailed, measured compiler-optimization write-up with benchmarks and reproducible code; practically relevant to low-level builders but narrow in audience and not a landmark.
- AI judgeJudge 3gpt-5.6-luna
- A rigorous, reproducible optimization write-up with assembly, compiler behavior, mathematical justification, benchmarks across CPUs, and released library code. It offers directly actionable performance techniques, though its importance is concentrated among systems and performance programmers.
Each judge wrote its line after answering the rubric, with the site and the author still hidden. Every answer behind this is in the table under Score.
Score
0.62total under rubric v2.3
- Significance0.47
- Reader interest0.70
- Audience breadth0.48
- Practical relevance0.68
- Substantiated0.91
- Technical depth0.96
- New information0.92
- Counts against: Promotional0.03
- Counts against: Overclaim0.22
Each judge’s answer per question (0–1), their mean and spread, and what the question adds to the score (weight × mean).
| Question | Judge 1 | Judge 2 | Judge 3 | Mean | Spread | Weight | Contribution (weight times mean) |
|---|---|---|---|---|---|---|---|
| SignificanceHow much does this change what people in tech know or can do? | 0.48 | 0.30 | 0.62 | 0.47 | 0.32 | +0.24 | +0.112 |
| Reader interestWould a well-informed senior engineer or tech founder want to read this today, and likely pass it on? | 0.61 | 0.60 | 0.90 | 0.70 | 0.30 | +0.26 | +0.183 |
| Audience breadthHow many people who build technology does it concern? | 0.55 | 0.30 | 0.58 | 0.48 | 0.28 | +0.13 | +0.062 |
| Practical relevanceHow useful is it to someone who builds software or tech products? | 0.68 | 0.55 | 0.82 | 0.68 | 0.27 | +0.22 | +0.150 |
| SubstantiatedHow well is it backed? Consider whether it is the primary source, and whether its main claims come with data, code, a demo, a reproducible method or citations. | 0.98 | 0.80 | 0.95 | 0.91 | 0.18 | +0.05 | +0.046 |
| Technical depthHow technically substantive is it? | 1.00 | 0.90 | 0.98 | 0.96 | 0.10 | +0.05 | +0.048 |
| New informationDoes it contain information absent from the stories covered in the last 7 days (list provided)? | 0.87 | 0.90 | 0.98 | 0.92 | 0.11 | +0.05 | +0.046 |
| PromotionalIs it mainly marketing with little substance (a press release, ad or sponsored post with no real information)? A launch post that carries real news is not promotional. | 0.04 | 0.03 | 0.01 | 0.03 | 0.03 | −0.19 | −0.005 |
| OverclaimDo the headline or conclusions claim more than the body supports? | 0.38 | 0.20 | 0.08 | 0.22 | 0.30 | −0.11 | −0.024 |
| Sum of contributions | +0.617 | ||||||
| Claim-check penalty | 0.000 | ||||||
| Total, as published | 0.617 | ||||||
Spread is the highest minus the lowest judge answer. marks a spread above 0.40: the judges disagree, and the story is marked contested.
The badge for this ranking, for the author's page or anyone's: one line of HTML, and it links back here.
<a href="https://rubric.hrih.si/editions/2026-11-01/15/"><img src="https://rubric.hrih.si/badge/2026-11-01/15.svg" alt="Ranked #15 on Rubric, 1 Nov 2026" width="238" height="28"></a>Claim check
Claim check: 2 matches source · 3 no source given · 3 couldn’t check. Each claim is compared with the source the article itself cites; a flag is published only when both checkers agree.
Couldn’t checkNumber
A 32-bit idiv on Emerald Rapids has a latency of about 12 cycles and a throughput of one every 6 cycles.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “Emerald Rapids about 12 cycles one every 6 cycles”
The source says No passage could be compared.
Source cited by the article: uops.info/html-instr/IDIV_R32.html
Couldn’t checkNumber
The Apple M4 performance core executes a 32-bit sdiv with a latency of 7 cycles and a throughput of one every 2 cycles.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “Apple M4 performance core 7 cycles one every 2 cycles”
The source says No passage could be compared.
Source cited by the article: jia.je/hardware/2025/05/21/apple-m4
Matches sourceNumber
Zen 5 and Arrow Lake can perform three 64-bit multiplications per cycle.
The cited source says the same thing.
The article says “Zen 5 and Arrow Lake do three 64-bit multiplications per cycle”
The source says “Measured (loop): 0.33”
Source cited by the article: uops.info/html-instr/IMUL_R64_R64.html
No source givenNumber
Among divisors between 3 and 1000 (excluding powers of two), 38% (376 of 990) require the correction step in the compiler's multiplication approach.
The article gives no link or citation for it.
The article says “among the divisors between 3 and 1000 (excluding powers of two), 38% require this correction (376 out of 990”
The source says No source to compare with.
Matches sourceGeneralization
Lemire, Bartlett and Kaser prove (Theorem 1) a necessary and sufficient condition on the multiplier c for ⌊c·n/m⌋=⌊n/d⌋ to hold for all n in [0,N].
The cited source says the same thing.
The article says “we show (Theorem 1) that ⌊c⋅nm⌋=⌊nd⌋ for all integers n in [0,N] if and only if”
The source says “We have that \division(n,d)=\division(c*n,m) for all integer numerators n in the range if and only if”
Source cited by the article: arxiv.org/abs/2012.12369
No source givenBenchmark result
With clang on the Intel processor, the div32 approach improves throughput by more than 20% for divisors 7, 60 and 365, while with GCC throughput does not change.
The article gives no link or citation for it.
The article says “With clang on the Intel processor, the throughput improves by more than 20%. With GCC, the throughput does not change in my benchmark”
The source says No source to compare with.
No source givenNumber
With random signs, the fastmod 0.1.0 signed division branch is mispredicted in 36% to 48% of divisions.
The article gives no link or citation for it.
The article says “With random signs, it is often mispredicted: in my tests, that happens in 36% to 48% of the divisions”
The source says No source to compare with.
Couldn’t checkBenchmark result
On the Intel processor, fastmod 0.2.0 is four times faster than the previous version and more than twice as fast as the division instruction with a runtime divisor of 7.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “The new version is four times faster than the previous one, and more than twice as fast as the division instruction”
The source says No passage could be compared.
Source cited by the article: github.com/lemire/fastmod/releases/tag/v0.2.0
Also covered by
No other coverage was clustered with this story.
Elsewhere
Elsewhere: HN 3 pts, not on front page
Recorded for context only, checked 1 Nov 2026, 05:47 UTC. It played no part in the ranking.