[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Does ScopeKey need to maintain a sorted (in ScopeLevel.l

smarlow@redhat.com do-not-reply at jboss.com
Sun Aug 23 15:30:35 EDT 2009


Just for comparison, I ran the same test with four threads (each thread does the same number of iterations, so workload is increased * 4).

Test run 1, original (current) ScopeKey implementation:

thread 1 - 22861ms
thread 2 - 22702ms
thread 3 - 23014ms
thread 4 - 23190ms

thread 1 - 20145ms
thread 2 - 20222ms
thread 3 - 19947ms
thread 4 - 19780ms

thread 1 - 19787ms
thread 2 - 19416ms
thread 3 - 19910ms
thread 4 - 19835ms

Test run 2, ScopeKey is implemented using ConcurrentSkipListMap and using getOptimizedKey for both Map key insertion and Map lookup:

thread 1 - 985ms
thread 2 - 1018ms
thread 3 - 923ms
thread 4 - 895ms

thread 1 - 1122ms
thread 2 - 797ms
thread 3 - 994ms
thread 4 - 1049ms

thread 1 - 1068ms
thread 2 - 998ms
thread 3 - 931ms
thread 4 - 979ms

thread 1 - 1022ms
thread 2 - 1017ms
thread 3 - 959ms
thread 4 - 893ms

Test run 3, ScopeKey is implemented using ConcurrentSkipListMap but getOptimizedKey is not used:

thread 1 - 2640ms
thread 2 - 3160ms
thread 3 - 3057ms
thread 4 - 2944ms

thread 1 - 3108ms
thread 2 - 2807ms
thread 3 - 3171ms
thread 4 - 2958ms

thread 1 - 3160ms
thread 2 - 3166ms
thread 3 - 3214ms
thread 4 - 3202ms

thread 1 - 2945ms
thread 2 - 2962ms
thread 3 - 2616ms
thread 4 - 2817ms


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251049#4251049

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251049



More information about the jboss-dev-forums mailing list