Proxy.isProxyClass scalability (original) (raw)

Peter Levart peter.levart at gmail.com
Wed Apr 24 12:21:42 UTC 2013


On 04/24/2013 09:16 AM, Peter Levart wrote:

On 04/24/2013 01:43 AM, Mandy Chung wrote: Precise check should be to validate if the given interfaces == the proxy interfaces implemented by the cached proxy class (i.e. proxyClass.getInterfaces()). Hi Mandy, I will try to profile this approach as a post-validation and let you know the results.

Hi Mandy,

Here's the modified webrev using optimized String-based sub-keys and pos-validation of proxyClass using proxyClass.getInterfaces():

https://dl.dropboxusercontent.com/u/101777488/jdk8-tl/proxy-wc/webrev.04/index.html

The benchmark results are the following:

Summary (4 Cores x 2 Threads i7 CPU): WeakCache+ ns/op Strings key+ Test Threads Original getIntfcs() post-valid. ======================= ======= =========== =========== Proxy_getProxyClass 1 2,453.77 565.96 4 3,051.12 653.81 8 5,113.27 1,174.33

Proxy_isProxyClassTrue 1 94.96 41.47 4 2,102.29 41.57 8 4,823.50 71.80

Proxy_isProxyClassFalse 1 86.59 1.36 4 2,139.05 1.36 8 4,639.17 2.72

Annotation_equals 1 222.86 195.39 4 2,972.93 197.66 8 9,658.96 338.62

... not that bad, but not so great either, compared to Weakly referenced interfaces-based sub-key and no post-validation:

WeakCache+ Test Threads ns/op Original intfcs key ======================= ======= ============== =========== Proxy_getProxyClass 1 2,403.27 163.57 4 3,039.01 211.70 8 5,193.58 322.14

Proxy_isProxyClassTrue 1 95.02 41.23 4 2,266.29 42.20 8 4,782.29 72.21

Proxy_isProxyClassFalse 1 95.02 1.36 4 2,186.59 1.36 8 4,891.15 2.72

Annotation_equals 1 240.10 194.61 4 1,864.06 198.81 8 8,639.20 342.90

Regards, Peter



More information about the core-libs-dev mailing list