Return-Path: Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 97179 invoked from network); 25 Aug 2003 08:43:06 -0000 Received: from smtp-out3.blueyonder.co.uk (195.188.213.6) by daedalus.apache.org with SMTP; 25 Aug 2003 08:43:06 -0000 Received: from localhost ([80.194.24.21]) by smtp-out3.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.5600); Mon, 25 Aug 2003 08:54:46 +0100 Date: Mon, 25 Aug 2003 08:56:47 +0100 Subject: Re: [BeanUtils] Interesting Microbenchmarks Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.482) X-OriginalArrivalTime: 25 Aug 2003 07:54:47.0032 (UTC) FILETIME=[27405F80:01C36ADE] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N hi chris i've taken a quick look and this seems interesting. i don't have time right now to take a good look but hopefully i will before too long. if you are thinking about putting something together that's beanutils compatible then i think that it's a good idea for me to give you some idea where i see things going. beanutils is in the process of being beanified. the booch utilities are now backed by pseudo-singletons and the functionality implemented in concrete classes. a lot of the functionality will most likely be factored out so that advanced users can hook into the api with alternative implementation strategies. though i think most folks are very, very keen to keep the core dependencies to a minimum (no more than we have now). i think that it's inevitable that we'll end up with an 'optional' package containing implementations with a wider range of dependencies. that'd allow a fast implementation using cglib to be added without the issue of adding cglib as a core dependency arising. i'm also interested to see if this technology might be useful to speed up other components which make extensive use of reflective (such as betwixt). - robert On Friday, August 22, 2003, at 01:52 AM, Chris Nokleberg wrote: > Craig R. McClanahan wrote: >> Results for PropertyUtils (no type conversions): >> =============================================== >> >> Method Dest Orig Dura #1 Dura #2 >> -------------- ---- ---- ------- ------- >> >> copyProperties bean bean 5,595 5,107 >> copyProperties dyna bean 4,567 4,126 >> copyProperties bean dyna 3,791 3,675 >> copyProperties dyna dyna 844 681 >> copyProperties bean map 3,938 3,755 >> copyProperties dyna map 931 772 > > I modified the PropertyUtils benchmark to use CGLIB: > > Method Dest Orig CGLIB? Duration > -------------- ---- ---- ------ -------- > > copyProperties bean bean no 4,871 > copyProperties bean bean yes 560 > copyProperties bean map no 2,895 > copyProperties bean map yes 461 > > About a 7x speedup (JDK 1.4.1, earlier JDKs will have greater speedup). > This is implemented in the simplest possible way using code already in > CGLIB; greater speedups could be achieved by writing more specialized > code, but I'd guess less than another 2x faster. > > BeanUtils initially wouldn't show the same improvement, since it is > doing a bunch of other stuff too, although some of that could be > optimized eventually--indexed/mapped properties, etc. > > I'll probably be putting together some sort of BeanUtils-like API in > CGLIB. I'll make sure that it will be easy for BeanUtils to hook into if > you decide it's something you want to do. If anyone has specific > thoughts as to what is most needed, feel free to write me or better yet > join the cglib-devel mailing list (http://cglib.sf.net/). > > Thanks, > Chris > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org >