|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 1999-12-02 07:55:09
Howard -
>My x86 assembly is a little rusty. I don't see the loop (where is EDX
getting decremented?). If this is the loop body and you've edited out
the loop, then the by-value looks like a very big win to me for this
platform. Is this with optimizations turned on?<
Yes thats just the loop body for the
*out = value;
assignment, everything else was the same for the byref/byvalue versions,
and yes that's with all optimisations turned on.
> Of course, it's possible to generate (or at least write by hand) _much_
faster code for an Intel CPU than this, in this specific case (using
REP STOSx ), but I don't know how many compiler optimisers are currently
that smart. (But then again, what we're doing here is trying to "design in"
optimiser hints, isn't it? :-)<
Exactly, I really wish that Wintel standard library ports included
specialisations for std::copy/fill/fill_n/unitialized_copy/unitialised_fill
etc etc, some of these could be much much more efficiently dealt with in
assembly for built in types - and it wouldn't actually require many
assembly functions either. Still I can dream I guess :-)
- John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk