Article View: comp.arch
Article #733Re: Large constants in RISC
From: BGB
Date: Sat, 14 Nov 2026 19:35
Date: Sat, 14 Nov 2026 19:35
41 lines
2744 bytes
2744 bytes
On 11/14/2026 1:10 PM, Anton Ertl wrote: > antispam@fricas.org (Waldek Hebisch) writes: >> I read what he wrote and I do not doubt that code having constants >> in instructions is faster. > > AMD64 has large constants (or at least better support for large > constants than ARM A64), yet according to reviews ARM A64 > implementations form Apple and IIRC also Qualcomm offer better > performance than the best AMD64 implementations. > WRT x86 (and x86-64 / AMD64): There is only so much you can polish a turd. Or, the big constants and relative niceties in some places, can't cover for the issue that in nearly every other regard it is kinda awful on this front. We are sort of reaching a point at this point, where jumping to a different architecture and then emulating x86 / x86-64 could become preferable to actually running the ISA natively. >> What is not clear how frequently >> code with explicit constants appears in real life. > > That can be and has been measured, and IIRC results have been posted here. > Yes. As I can note, cases where "prefix makes a 33 bit constant" are common enough to be worthwhile; even if still small in an absolute sense. Full 64-bit constants are uncommon enough to where one can debate them, but there are still cases where they can pay off. > - anton
Technical Details
Message-ID:
<11dad5j$26fdl$3@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11d76uq$11cdc$1@paganini.bofh.team> <11d7ct8$17akn$1@dont-email.me> <11d7ih2$11orr$1@paganini.bofh.team> <11d9d0d$1rsce$1@dont-email.me> <11d9tq8$1b9c1$2@paganini.bofh.team> <2026Nov14.201017@mips.complang.tuwien.ac.at>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: BGB <cr88192@gmail.com> Newsgroups: comp.arch Subject: Re: Large constants in RISC Date: Sat, 14 Nov 2026 13:35:14 -0600 Organization: A noiseless patient Spider Lines: 41 Message-ID: <11dad5j$26fdl$3@dont-email.me> References: <11d76uq$11cdc$1@paganini.bofh.team> <11d7ct8$17akn$1@dont-email.me> <11d7ih2$11orr$1@paganini.bofh.team> <11d9d0d$1rsce$1@dont-email.me> <11d9tq8$1b9c1$2@paganini.bofh.team> <2026Nov14.201017@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 14 Nov 2026 19:35:16 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2309557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/noB2on9Xuxb0hi0vCLPF7HpWAVURA4WE="; posting-host="7ae1d57c66f0e466bf10769bbb72476f" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:c7p0FVoDWTg+JwSy7/tmg3dNQwM= sha256:XCXwXN0DFNgL17He65Qln9E68C3hi+x2Ub4Fk7PEcmM= sha1:ZvmtAbMPVTimGG6O/XjnQRe5FkQ= sha256:XD28oo5FFrFVRyUl4/hILk1BsYHZilxmnP1hk2r1v4U= Content-Language: en-US In-Reply-To: <2026Nov14.201017@mips.complang.tuwien.ac.at>