Björkus "No time_t to Die" Dorkus @thephd.dev · Dec 12

Doing that can actually net you speedups that get you close to (but still not as good as) lambdas, and further tweaks to the Rosetta Code itself can make it perform slightly faster by not giving every `arg*`/`ARG*` a unique instance per run like the rosetta code does. The results then look like:

8 likes 2 replies

?

Replies

Λriane Two ☑️ · Dec 12

Since noop is clearly the fastest, I suggest that noop should be added to the C standard ;-)

Björkus "No time_t to Die" Dorkus · Dec 12

e.g., the normal C code performs about as good as paying for an indirection through a function pointer / structure, similar to what happens with `std::function_ref` and a Lambda or the optimized union-based class member.