commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vic Cekvenich <cekvenich_...@baseBeans.com>
Subject Re: [BeanUtils] Interesting Microbenchmarks
Date Tue, 07 Oct 2003 15:25:12 GMT

This would be great, and here's the good news:

http://www.objectweb.org/wws/arc/architecture/2003-10/msg00048.html



Chris Nokleberg wrote:
> I finally got around to adding a dedicated BeanCopier class to CGLIB.
> The API looks something like:
> 
>   BeanCopier copier = BeanCopier.create(bean1.getClass(), bean2.getClass());
>   copier.copy(bean1, bean2);
> 
> The copiers are cached, but if you can reuse the very same instance you get
> much faster times, so I've benchmarked both ways. This is for 100000
> iterations on JDK 1.4.2_01 (Linux).
> 
>   CGLIB? Reuse copier? Duration
>   ------ ------------- --------
>   No     N/A           4,110 ms    <-- PU.copyProperties(bean,bean)
>   Yes    No               87 ms
>   Yes    Yes               5 ms
> 
> The results were better than I expected :-) The generated code is very
> simple which I think lets HotSpot really go to town.
> 
> Chris



---------------------------------------------------------------------
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