On Wed, 9 May 2001, Larry Wall wrote:

> Dave Mitchell writes:
> : My thinking behind "if fails on one, avoid on all" was that if it failed
> : on at least one, then it may well fail on others that you dont have access
> : to - either now or in the future, and thus perhaps isnt as good an optimisation
> : as you figured. The other way would to be only enable for those architectures
> : that experience a speedup.  
> 
> Makes sense.
> 
> Larry
> 

        It does, however, mean that the code ends up *riddled* with with
#ifdef's instead of merely shot full of them.  I don't know about the rest
of you, but I find this annoying and difficult to read:

#if defined MAC
        do A
        ...ten lines or so...
#elif defined WIN32
        do B
        ...ten lines or so...
#elif defined VMS
        do C
        ...ten lines or so...
#elif defined AMIGA
        do D
        ...ten lines or so...
#elif defined BIG_IRON
        do E
        ...ten lines or so...
#else
        do non-optimized version
        ...ten lines or so...
#endif


        Dave    

Reply via email to