commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert <rob...@bull-enterprises.com>
Subject Re: [BeanUtils] Interesting Microbenchmarks
Date Sun, 05 Oct 2003 05:01:03 GMT
That was the only change? Adding in the BeanMap calls? I like that!
I'll look more into CGlib, thanks.

Robert

Chris Nokleberg wrote:
> Robert wrote:
> 
> 
>>What exactly did CGLIB do in this case? I took a look at the web site,
>>but from what I could see, CGLIB is a way to wrap classes for method
>>interception ala proxy style. I'm sure I'm missing something, but I
>>couldn't quite tell from the docs.
> 
> 
> The docs need some work. The original purpose for CGLIB was as better
> version of java.lang.reflect.Proxy, but it has grown into a repository for
> "all things code generated". The benchmarks I generated used the BeanMap
> class (net.sf.cglib.beans.BeanMap in CVS), which is a dynamic Map view of a
> bean. To copy one bean to another I just did
> 
>   BeanMap.create(bean2).putAll(BeanMap.create(bean1));
> 
> I intend to eventually add a dedicated BeanCopier class which will eliminate
> the remaining overhead.
> 
> Chris
> 
> 
>>Chris Nokleberg wrote:
>>
>>>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
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message