Re: Mystery: static variables & performance
"Sidney Cadot" <sidney@jigsaw. nl> wrote in message
news:c09amm$jm1 $1@news.tudelft .nl...[color=blue]
> Mark Shelor wrote:[color=green]
> > As author of a portable
> > cryptographic digest package, I cannot predict which C compiler a
> > particular user might actually employ to build the package. Yet it's
> > reasonable to want to ensure that--no matter which implementation is
> > chosen--the result will execute efficiently.[/color]
>
> True. I think you should consider if 5--30% is really worth an effort
> though.
>[color=green]
> > And there are clever ways
> > to go about this that avoid the incremental approach of simply piling up
> > a mountain of #ifdef's in the code to handle specific cases.[/color]
>
> I wonder if there really is anything other than a mountain of ifdefs.[/color]
One could code separate source files for the platform-specifics,
with the desired one(s) selected at build time by e.g. a 'make'
utility's switches or arguments.
-Mike
"Sidney Cadot" <sidney@jigsaw. nl> wrote in message
news:c09amm$jm1 $1@news.tudelft .nl...[color=blue]
> Mark Shelor wrote:[color=green]
> > As author of a portable
> > cryptographic digest package, I cannot predict which C compiler a
> > particular user might actually employ to build the package. Yet it's
> > reasonable to want to ensure that--no matter which implementation is
> > chosen--the result will execute efficiently.[/color]
>
> True. I think you should consider if 5--30% is really worth an effort
> though.
>[color=green]
> > And there are clever ways
> > to go about this that avoid the incremental approach of simply piling up
> > a mountain of #ifdef's in the code to handle specific cases.[/color]
>
> I wonder if there really is anything other than a mountain of ifdefs.[/color]
One could code separate source files for the platform-specifics,
with the desired one(s) selected at build time by e.g. a 'make'
utility's switches or arguments.
-Mike
Comment