Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Terje Mathisen Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Tue, 3 Sep 2024 17:46:38 +0200 Organization: A noiseless patient Spider Lines: 72 Message-ID: References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <2024Aug30.195831@mips.complang.tuwien.ac.at> <2024Aug31.170347@mips.complang.tuwien.ac.at> <505954890d8461c1f4082b1beecd453c@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Date: Tue, 03 Sep 2024 17:46:39 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f05a5d1bbdc6ef5b61535a1922778e45"; logging-data="3573511"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gZH9dj9s90Aky6psQS/4lp3cA/kg3LfTxi0Zm5uIRLg==" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2 Cancel-Lock: sha1:DwBVfjyfu3pk2mUFRVmwyTRyngo= In-Reply-To: Bytes: 4256 Stephen Fuld wrote: > On 9/2/2024 1:23 AM, Terje Mathisen wrote: >> Stephen Fuld wrote: >>> On 8/31/2024 2:14 PM, MitchAlsup1 wrote: >>>> On Sat, 31 Aug 2024 21:01:54 +0000, Bernd Linsel wrote: >>>>> You compare apples and peaches. Technical specifications for your >>>>> pressure vessel result from the physical abilities of the chosen >>>>> material, by keeping requirements as vessel border width, geometry = >>>>> etc., >>>>> while compiler writers are free in their search for optimization=20 >>>>> tricks >>>>> that let them shine at SPEC benchmarks. >>>> >>>> A pressure vessel may actually be able to contain 2=C3=83=C6=92=C3=A2= =E2=82=AC=E2=80=9D the=20 >>>> pressure it >>>> will be able to contain 20 after 20 years of service due to stress >>>> and strain acting on the base materials. >>>> >>>> Then there are 3 kinds of metals {grey, white, yellow} with differen= t >>>> responses to stress and induced strain. There is no analogy in code-= - >>>> If there were perhaps we would have better code today... >>> >>> Perhaps an analogy is code written in assembler, versus coed written = >>> in C versus code written in something like Ada or Rust.=C3=82=C2=A0 B= acking=20 >>> away now . . . :-) >> >> IMNSHO, code written in asm is generally more safe than code written=20 >> in C, because the author knows exactly what each line of code is going= =20 >> to do. >> >> The problem is of course that it is harder to get 10x lines of correct= =20 >> asm than to get 1x lines of correct C. >> >> BTW, I am also solidly in the grey hair group here, writing C code=20 >> that is very low-level, using explicit local variables for any loop=20 >> invariant, copying other stuff into temp vars in order to make it=20 >> really obvious that they cannot alias any globals or input/output=20 >> parameters. >> >> Anyway, that is all mostly moot since I'm using Rust for this kind of = >> programming now. :-) >=20 > Can you talk about the advantages and disadvantages of Rust versus C? Q&D programming is still far faster for me in C, but using Rust I don't=20 have to worry about how well the compiler will be able to optimize my=20 code, it is pretty much always close to speed of light since the entire=20 aliasing issue goes away. Rust also gets rid of the horrible external library/configure/cmake mess = that kept me from successfully compiling the reference LAStools lidar=20 code for nearly 10 years. Using the Rust port I just tell cargo to add it to my project and that's = it. Terje --=20 - "almost all programming can be viewed as an exercise in caching"