Path: ...!npeer.as286.net!npeer-ng0.as286.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: Michael S Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Wed, 28 Aug 2024 13:43:23 +0300 Organization: A noiseless patient Spider Lines: 21 Message-ID: <20240828134323.00003ce1@yahoo.com> References: <20240825192810.0000672c@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Date: Wed, 28 Aug 2024 12:42:43 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2b25a07d238d6ca28257f820d04d36b4"; logging-data="3620804"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jhcg4n3dnV9RuJjo1fJkmhioQvWmlKgo=" Cancel-Lock: sha1:TwWIGXaPFVJMB1j2K0vjrs3JrtA= X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32) Bytes: 2679 On Wed, 28 Aug 2024 11:49:32 +0200 Bonita Montero wrote: > Am 28.08.2024 um 11:26 schrieb David Brown: >=20 > > No, they don't.=C2=A0.. =20 >=20 > Then the branch is the most expensive part, no matter if > you're doing a call or a table-dispatch within a function. >=20 Cortex-M3 and M4 have really short pipeline - 3 stages. So branches are not that expensive. The difference between direct and indirect branch is close to 2x even when pointer is in maximally fast memory. Significantly more than that when pointer is in flash, esp. when core runs at relatively high frequency, say 150-200 MHz. Virtual function call is typically implemented as double indirection, so it ends up even slower than C-style call through function pointer.