Path: ...!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Tue, 10 Sep 2024 15:09:41 -0400 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <2024Sep10.191607@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 10 Sep 2024 21:09:42 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ac4d9eb9270acb92e6d319034819a10b"; logging-data="3268991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197xd3xFA+fHaRN3QsTk8DhEAZDU/Wx+Vk=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:8DlKw7naVo21xTPQ9V/W7zuCY90= sha1:psUN+m2X5IgMmxgJCIRFDTkoYOY= Bytes: 2161 > Again - sometimes a compiler will recognise a particular hand-optimised > pattern, turn it back to something logically simpler, then optimise from > there. But you cannot /expect/ that. You might even consider those as performance bugs, since the hand-optimized code is sometimes chosen specifically to try and impose a particular kind of code. Compiler's "optimizations" are usually just heuristics so compilers are often better off not being "too clever" so as to allow manual-optimization to override the heuristics: if programmers want to use the heuristics, they should write simple&clear code. Stefan