I just did some test timings and discovered that the use of hash_map 
for PropertyMap is actually now inferior to the std::map we started 
out with.

Way back then, we were using plain strings as the keys for the map, so 
we switched to hash_map for quicker lookup; a while later we switched 
the keys from strings to PropertyNames which are efficiently 
comparable like ints, but we never reconsidered the choice of map 
container.  Turns out std::map is now significantly quicker in the 
real world, and switching back to it cuts in half the time taken for 
things like large quantization operations.   (A hash map might still 
win in theory but I think the SGI one is not the fastest design for 
small hashes of small objects, although it was an easy winner when we 
had string keys.)

Anyhow, I couldn't see any real disadvantages to switching back, so 
I've made the change (via a #ifdef in PropertyMap.h) and committed 
it.  Let me know when you find everything mysteriously stops working.


Chris



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to