Article View: comp.arch
Article #741Re: Large constants in RISC
From: John Savard
Date: Sun, 15 Nov 2026 01:57
Date: Sun, 15 Nov 2026 01:57
24 lines
2175 bytes
2175 bytes
On Sat, 14 Nov 2026 15:13:14 -0000 (UTC), antispam@fricas.org (Waldek Hebisch) wrote: >I read what he wrote and I do not doubt that code having constants >in instructions is faster. What is not clear how frequently >code with explicit constants appears in real life. I guess that depends on how you define real life. It makes sense for a program to read in values, rather than depending on hardcoded values, if there's any chance at all they might change. Recompiling as a way to work on a new, but closely related, problem is wasteful. Even so, there were lots of constants in the FORTRAN programs I wrote as exercises when learning how to program. I still use a BASIC program to draw vector world maps in a number of projections, which I use to illustrate a section of my web site about cartography. The points ending the line segments of coastlines are in a file. The constants in the formulas describing the map projections are in the program itself. John Savard
Technical Details
Message-ID:
<6af91096.18190640@news.eternal-september.org>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>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: quadibloc@invalid.com (John Savard) Newsgroups: comp.arch Subject: Re: Large constants in RISC Date: Sun, 15 Nov 2026 01:57:42 GMT Organization: A noiseless patient Spider Lines: 24 Message-ID: <6af91096.18190640@news.eternal-september.org> 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> Injection-Date: Sun, 15 Nov 2026 01:57:42 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2555129"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vXOW4LTO18+LvAP2Hi5gelhMV+eL8b50="; posting-host="ddc300d73b1664759c730a6e52f692cf" Cancel-Lock: sha1:317gIeZig97L4UCyAaRc/vx/SfI= sha256:adP09FrCkXsqFvPkl88FUiqeMtnHnPMLuATeZD/iEKc= sha1:RoSaB5Loj/ZIVUeHPtmTSoafYKU= sha256:RjFNpeXybDDkHSu0l6ZONOdZd4USvmOOrFDztpZG3Uc= X-Newsreader: Forte Free Agent 1.1/32.230