Norman Vine writes:
> > In my (limited) tests, even inlining something like
> >
> > void setFoo (double foo) { _foo = (foo < 0 ? 0 : foo); }
> >
> >slows things down.
>
> Really ??
>
> then try this both with and without optimization :-))
Ah, yes, but this is a tight loop. In my tests on props.hxx, the
inlined code came in the middle of a long code block. I didn't have
time to do a lot of rewriting, but even when I did something as simple
as
double x = 100 + jnk;
jnk = 1000 + test_junk(i);
double y = 50 / x;
jnk *= y;
the speed advantage of the inlined code was cut in half.
All the best,
David
--
David Megginson
[EMAIL PROTECTED]
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel