The Artima Developer Community
Sponsored Link

Java Buzz Forum
Intercept Benchmarks - Wow!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
Intercept Benchmarks - Wow! Posted: Dec 12, 2003 6:17 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: Intercept Benchmarks - Wow!
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

Put together a quick benchmark to test some changes Chris made to the intercept library. He realized that instead of caching per class and doing a hash look up that we could just cache per-method and not even have to do an array index. He also reworked the matrix to make more use of method filtering in CGLIB. I need to get better at CGLIB as the results speak for themselves:

Release 0.1.2 (the last release)

    [junit] Testsuite: org.skife.intercept.Benchmark
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 131.226 sec
    [junit] ------------- Standard Output ---------------
    [junit] #   Direct (ms)    Intercepted (ms)    Overhead (%)
    [junit] 1   6423.0         10847.0              68.87747158648607
    [junit] 2   6400.0         10298.0              60.90625000000001
    [junit] 4   6373.0         10560.0              65.69904283696846
    [junit] 8   6385.0         11067.0              73.32811276429129
    [junit] 16   6402.0         11932.0              86.37925648234928
    [junit] 32   6404.0         13735.0              114.47532792004998
    [junit] 64   6370.0         17538.0              175.32182103610677
    [junit] ------------- ---------------- ---------------

Release 0.2 (current)

    [junit] Testsuite: org.skife.intercept.Benchmark
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 124.792 sec
    [junit] ------------- Standard Output ---------------
    [junit] #   Direct (ms)    Intercepted (ms)    Overhead (%)
    [junit] 1   6376.0         7220.0              13.237139272271015
    [junit] 2   6366.0         7331.0              15.158655356581852
    [junit] 4   6365.0         7579.0              19.07305577376277
    [junit] 8   6383.0         8015.0              25.567914773617417
    [junit] 16   6372.0         9464.0              48.5247959824231
    [junit] 32   6626.0         10821.0              63.3111983096891
    [junit] 64   6375.0         14674.0              130.18039215686272
    [junit] ------------- ---------------- ---------------

The first column is the number of interceptors on the invocation (I am afraid of an app with a 64 interceptor deep stack). The interceptor does nothing but immediately yield to the next interceptor in the stack. Eventually a virtual toString() is called that defaults back up to Object.toString(). Also, it requires a build of CGLIB against cvs at the moment, everything required should be in CGLIB 2.0 RC1 coming up though.

The benchmark is available in the source distro via ant benchmark

Managed to talk Chris into accepting cvs access =)

Read: Intercept Benchmarks - Wow!

Topic: Inconsistency between Servlet specification implementations Previous Topic   Next Topic Topic: UCL (continued)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use