Runtime version statement

Iain Buclaw ibuclaw at ubuntu.com
Tue Jan 10 02:05:15 PST 2012


On 10 January 2012 09:42, Martin Nowak <dawg at dawgfoto.de> wrote:
>> Function pointers are super-slow on some architectures. I don't think it's
>> a particularly good solution unless the functions you're calling do a lot
>> of work.
>
> If you're working on very specific platforms you can likely determine
> such things at compile time. Alternative approaches are distributing
> multiple
> executables or using template parameterization of whole engines.

I did have GDC hooked up to the C pre-processor macros, which defined
a lot of target-specific identifiers (GNU_SSE, GNU_SSE2, etc)
depending on the default target flags, and what extra target flags you
passed to the compiler - but was dropped because of growing number of
stub dependencies it incurred, and the fact that most macros were
about as useful as marmite sundae.   I would be certainly up for
addressing this in a pragmatic way though.

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list