Re:Going Faster by Duplicating Code
by voidstarcpp on Wednesday October 11, 2023 @08:45AM
(#37843715)
The "tiny math function" is used for expository purposes of the generic application, to fit a trivial example on one page. Obviously it's not how you would literally write a function that transforms elements in a vector.
Well, that's because they did it wrong. Tiny math function like this should be defined in the header file and force-inlined, problem solved. No need for that template monstrosity suggested at the end.