On Wed, 15 Sep 2010, Erik Hofman wrote:

> After thinking about it I think that in the second case the property
> tree is being walked trough by the C++ code while in the first case it's
> done in Nasal. You just discovered that Nasal is 10x slower than C++ code!
> This is exactly why I prefer core code to end up in C++ in the end.
>
> That said, Nasal performance tests are always useful.

Hi,

I think a bigger issue might be that both getChild() and getNode() 
create and return a hash object that is only used once here before 
becoming garbage. Since this was loop with many iterations a good deal of
garbage was created so possibly a significant amount of the time was spent 
in the garbage collector. OTOH the string handling also ought to generate 
garbage but the short strings are probably smaller than the hash objects.

My 1 minute of thought to the morning coffee..

Cheers,

Anders
-- 
---------------------------------------------------------------------------
Anders Gidenstam
WWW: http://www.gidenstam.org/FlightGear/

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to