I've been running some experiments on the property manager today, retrieving different kinds of double properties in a tight loop and timing the results (the worst case was 6.2 seconds for 100M accesses of a property tied to object methods; the best was 4.3 seconds for 100M accesses of a property tied to a pointer). I had been concerned that SGPropertyNode::getDoubleValue was showing up at the top of the profiling output for JSBSim, but I think that that was masking the object methods it was invoking in other JSBSim code.
I tried a lot of different combinations to speed things up and have managed around a 13 per cent improvement so far for internal properties, but not much for anything else. The biggest surprise was that inlining methods made things slower, not faster, in most cases (there were a couple of exceptions). That may be a quirk of G++'s code generation, but it's probably worth considering -- I had inlined much of the infrastructure to try to speed things up, but then put it back out of line again piece by piece. Since inlined code is nasty for other reasons -- it bloats the executable, makes the header files hard to read, screws up gdb, and forces a lot of recompilation whenever the implementation changes (since everything that includes the header has to be recompiled) -- we might want to consider trying to avoid it. Does anyone know of any studies or statistics available on this? All the best, David -- David Megginson [EMAIL PROTECTED] _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel