| Deutsch English Français Italiano |
|
<14qaij9n9tjnr6gc1lfu4o69hb68gtcguf@4ax.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: john larkin <jl@glen--canyon.com> Newsgroups: sci.electronics.design Subject: Re: OT: Programming Languages Date: Fri, 01 Nov 2024 16:54:44 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: <14qaij9n9tjnr6gc1lfu4o69hb68gtcguf@4ax.com> References: <vg3575$3bio0$1@dont-email.me> <vg383n$3c25s$1@dont-email.me> <vg3m01$3e15j$2@dont-email.me> <vg3mnf$3egtc$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Sat, 02 Nov 2024 00:52:40 +0100 (CET) Injection-Info: dont-email.me; posting-host="2ec3536565cad72a850a63ff8010b7a5"; logging-data="3642030"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zejKyoYS3VwtVJYfr7zSU" User-Agent: ForteAgent/8.00.32.1272 Cancel-Lock: sha1:vhKLR1uztX6suB4+cJk3jqMCIsw= Bytes: 1949 On Fri, 1 Nov 2024 16:03:00 -0700, Don Y <blockedofcourse@foo.invalid> wrote: >On 11/1/2024 3:50 PM, Nick Hayward wrote: >> What about C++? > >C++ is an order of magnitude more complex than C. Even a >casual C programmer can imagine what his code will look >like after compilation. I.e., can imagine exactly what the >CPU will be doing (ignoring the fact that the compiler will >often out-think the coder in terms of time/space efficiency). We want to time the execution of a control algorithm. One way to time it is to run it in a loop maybe 100K times and measure that with a stopwatch. But a very smart compiler might run it once, notice that nothing has changed, and skip the reruns. It's best to bang a port pin and measure it with an oscilloscope. We've had FPGA compilers do that sort of thing, optimize out intentional delays. One fix is to XOR signals with a level from a pin that *we* know is always low.