C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Callsite passed as template parameter

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Thu, 16 Nov 2023 12:29:07 +0000
On Thu, 16 Nov 2023, 11:39 Frederick Virchanza Gotham, <
cauldwell.thomas_at_[hidden]> wrote:

> On Thu, Nov 16, 2023 at 10:19 AM Jonathan Wakely <cxx_at_[hidden]> wrote:
> >
> > OK, but not suitable for the C++ standard. This isn't a mailing list for
> sharing your cool ideas.
>
>
> Are you saying that the C++ standard shouldn't accommodate
> microcontrollers, or that the C++ standard shouldn't accommodate
> micro-optimisation?
>

I'm not saying anything so general.

I'm saying that this idea, which has a large cost that is only acceptable
in very limited circumstances, is not suitable for the standard.




> Last Thursday I was at a C++ talk in Belfast by Jason McGuiness where
> he was talking about writing template state machines to take advantage
> of the x86 instruction:
>
> call qword pointer [ immediate + immediate * register ]
>
> instead of using an 'if else' ladder. He was trying to shave off CPU
> cycles in his code for low latency financial trading systems. People
> are actually doing that.
>

I am well aware.

Received on 2023-11-16 12:29:23