From: "Christian Mayer" <[EMAIL PROTECTED]> > Norman Vine wrote: > > > > This profiling run might be enlightening > > > > time seconds seconds calls us/call us/call name > > 4.07 2.45 0.14 657919 0.21 0.21 fgGetBool(char const > > 3.49 2.57 0.12 2352563 0.05 0.05 fgGetDouble(char const > > 3.20 2.92 0.11 1617164 0.07 0.07 fgGetNode(char const > > 2.33 3.00 0.08 1222609 0.07 0.07 fgGetInt(char const *, > > 1.16 3.31 0.04 2109792 0.02 0.02 fgGetString(char const > > IT's very interesting to see that fgGetBool takes a significantly longer > time to run (3x - 10x as long). > > Perhaps we can optimze the result by returning a int instead of a bool > (afaik is int supposed to be the 'fastest' type for any system)? > > CU, > Christian >
MSVC emits a warning like this : c:\flightgear\cvs\flightgear\src\model\model.cxx(354) : warning C4800: 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning) This can be an hint that converting int to bool is not gratis ! Cheers, -Fred _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel