On 27.04.2009, at 09:42, Meikel Brandmeyer wrote:

> AFAIU, struct-maps are not an optimisation for efficiency of the
> key lookup, but for the storage space of the keys. So "timings"
> should probably read "memstats".

If memory is the issue, then creating a single instance of the  
metadata map for all values of a type should be sufficient.

As for timing, key lookup is faster for struct maps than for standard  
maps if the number of keys defined in the struct is much smaller than  
the total number of keys in the map. This is probably not the case  
for most real-life metadata maps. Key lookup can be improved even  
more using accessor functions, but that would imply relying on the  
metadata being a struct-map for a given struct, which doesn't look  
like a great idea.

Konrad.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to