optimization question: mpl
Larry Evans
cppljevans@suddenlink.net
Wed Jul 28 19:00:00 GMT 2010
On 07/28/10 13:16, Piotr Rak wrote:
[snip]
> Or you could just initialize static array of pointers, like that
> (please note, that I never compiled code below):
[snip]
>
Piotr, something similar was proposed here:
http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/364c0dd5ce512497#
however, the response there indicates the code would be faster with a
switch. I don't really understand why, especially if the array of
pointers was a constexpr, but then I'm not compiler writer.
-regards,
Larry
More information about the Gcc
mailing list