Deutsch English Français Italiano |
<vkd19q$1fl5o$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" <randy@rrsoftware.com> Newsgroups: comp.lang.ada Subject: Re: Ichbiah 2022 compiler mode Date: Mon, 23 Dec 2024 19:03:53 -0600 Organization: A noiseless patient Spider Lines: 25 Message-ID: <vkd19q$1fl5o$1@dont-email.me> References: <vbc625$at65$1@dont-email.me> <vbdgs7$hedr$1@dont-email.me> <vk4uee$3lfp0$1@dont-email.me> <vk5tc9$3uoku$1@dont-email.me> <vk6tag$4tm1$1@dont-email.me> Injection-Date: Tue, 24 Dec 2024 02:03:55 +0100 (CET) Injection-Info: dont-email.me; posting-host="7679ac0d27a6a387fcac4223d25801d0"; logging-data="1561784"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/v6EP2H/UhIMdrqWfcqnua4rRufPoFo1k=" Cancel-Lock: sha1:Oru+GCTllDDdhQ8+O18ErIaT2vM= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-Priority: 3 X-RFC2646: Format=Flowed; Response Bytes: 2071 "G.B." <bauhaus@notmyhomepage.invalid> wrote in message news:vk6tag$4tm1$1@dont-email.me... > On 21.12.24 09:14, Randy Brukardt wrote: .... >> Constants do help the compiler generate better code, although a lot of >> the >> benefits can be gained also by working harder. (That's what C compilers >> do, >> after all.) > > What are some compilers offering today? That is, can they find > declarations > of variables that could be constants, if so instructed? I was thinking from a code generation perspective, as opposed to static analysis. These are really the same process, but in one case the output is only for a computer, and in the other, the output is for a human. The needs of those outputs are quite different. I think a lot of compilers do optimizations of constants by discovery, but few compilers do much beyond rudimentary static analysis. I expect that to change, but I may be an optimist on that... Randy.