commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: [BeanUtils] Interesting Microbenchmarks
Date Mon, 25 Aug 2003 13:25:40 GMT
> 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).

Code generation is useful for server applications, but it is always good to
have two implementations:
1 Reflection for testing and development (better error messages and faster
startup).
2 Code generation for production (performance in long run)

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