some performance numbers (test code is here
http://pastebin.com/f6ead5a8a). I simulated
doing a ConcurrentHashMap lookup with ScopeKey used as the key. From a single thread, I
performed 3161899 * 5 map look ups to see what the performance implications are of the
ScopeKey modifications.
Test run 1, original (current) ScopeKey implementation:
6058ms
6118ms
6016ms
6047ms
5952ms
6061ms
Test run 2, ScopeKey is implemented using ConcurrentSkipListMap and using getOptimizedKey
for both Map key insertion and Map lookup:
496ms
498ms
524ms
514ms
524ms
Test run 3, ScopeKey is implemented using ConcurrentSkipListMap but getOptimizedKey is not
used:
1233ms
1553ms
979ms
937ms
2229ms
Test run 4, ScopeKey is implemented using ConcurrentSkipListMap and using getOptimizedKey
for only Map key insertion. Map lookup is using ScopeKey (probably slower due to mixing
different object types in equals())
3815ms
3225ms
3978ms
3914ms
3201ms
Test run 5, ScopeKey is implemented using ConcurrentSkipListMap and using getOptimizedKey
for only Map lookup. Map key insertion is with ScopeKey (probably slower due to mixing
different object types in equals())
2754ms
2994ms
2938ms
2851ms
2777ms
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251048#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...