Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #3726

Paper: dividing by seven

Path csiph.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From John R Levine <johnl@taugh.com>
Newsgroups comp.compilers
Subject Paper: dividing by seven
Date Fri, 10 Apr 2026 12:04:13 -0400
Organization Compilers Central
Sender johnl%iecc.com
Approved comp.compilers@iecc.com
Message-ID <26-04-002@comp.compilers> (permalink)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="59820"; mail-complaints-to="abuse@iecc.com"
Keywords code, optimize, paper
Posted-Date 10 Apr 2026 12:26:05 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:3726

Show key headers only | View raw


Optimization of 32-bit Unsigned Division by Constants on 64-bit Targets

Shigeo Mitsunari, Takashi Hoshino

Granlund and Montgomery proposed an optimization method for unsigned
integer division by constants [3]. Their method (called the GM method in
this paper) was further improved in part by works such as [1] and [7], and
is now adopted by major compilers including GCC, Clang, Microsoft
Compiler, and Apple Clang. However, for example, for x/7, the generated
code is designed for 32-bit CPUs and therefore does not fully exploit
64-bit capabilities. This paper proposes an optimization method for 32-bit
unsigned division by constants targeting 64-bit CPUs. We implemented
patches for LLVM/GCC and achieved speedups of 1.67x on Intel Xeon w9-3495X
(Sapphire Rapids) and 1.98x on Apple M4 (Apple M-series SoC) in the
microbenchmark described later. The LLVM patch has already been merged
into llvm:main [6], demonstrating the practical applicability of the
proposed method.

https://arxiv.org/abs/2604.07902

Regards,
John Levine, johnl@taugh.com, Taughannock Networks, Trumansburg NY
Please consider the environment before reading this e-mail. https://jl.ly

Back to comp.compilers | Previous | NextNext in thread | Find similar


Thread

Paper: dividing by seven John R Levine <johnl@taugh.com> - 2026-04-10 12:04 -0400
  Re: Paper: dividing by seven anton@mips.complang.tuwien.ac.at - 2026-04-13 05:48 +0000
  Re: Paper: dividing by seven robin51@dodo.com.au - 2026-04-19 00:19 +1000
    Re: Paper: dividing by seven anton@mips.complang.tuwien.ac.at - 2026-04-19 14:30 +0000

csiph-web