Two
things going on.
One:
bytecode enhancement invocations are less expensive in terms of memory ...
wrapper objects don't have to be created.
Second: hotspot may be seeing that there's only one implementation of
your interface; it does some optimizations when that's the case (and undoes them
when a new implementation arrives). Oh, you are using IBM ... might be the
same though.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source
Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
-----Original Message-----
From: Sikha, Naresh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 5:13 PM
To: '[email protected]'
Subject: Bytecode engineer versus dynamic proxyHivemind users,Are there any hard number comparisons of bytecode engineer versus dynamic proxy? The reason I ask is that I've written a Hivemind factory that bytecode engineers a proxy for an interface as a proof of concept and am comparing it to a dynamic proxy version based on an invocation framework that I previously developed and I wanted to get confirmation on the numbers I'm seeing.For 10000 method invocations (the method logic performs a lot of business functions - its not just stub code):
Run Bytecode Engineered Dynamic Proxy Percentage 1 1415 1596 88.66% 2 743 853 87.10% 3 753 844 89.22% Which is roughly a 11% performance difference (on IBM JDK 1.4.1/Windows XP).I had hoped for a more compelling difference to make the case for moving beyond a proof of concept a bit stronger.Thanks.Naresh Sikha
Senior Staff, Technology Solutions
Charles Schwab & Co., Inc.
211 Main Street
SF211MN-07-347
San Francisco, CA 94105-1918
W: 415-667-1286
F: 415-667-9397
E: [EMAIL PROTECTED]
WARNING: All email sent to this address will be received by the Charles Schwab & Co., Inc. corporate email system and is subject to archival and review by someone other than the recipient.
