Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 99776 invoked from network); 7 Oct 2003 15:25:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Oct 2003 15:25:47 -0000 Received: (qmail 1397 invoked by uid 500); 7 Oct 2003 15:25:19 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 1307 invoked by uid 500); 7 Oct 2003 15:25:18 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 1279 invoked from network); 7 Oct 2003 15:25:18 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 7 Oct 2003 15:25:18 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A6tiC-0001vk-00 for ; Tue, 07 Oct 2003 17:25:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: commons-dev@jakarta.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A6tiB-0001vc-00 for ; Tue, 07 Oct 2003 17:25:19 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A6tiB-0003eC-00 for ; Tue, 07 Oct 2003 17:25:19 +0200 From: Vic Cekvenich Subject: Re: [BeanUtils] Interesting Microbenchmarks Date: Tue, 07 Oct 2003 11:25:12 -0400 Lines: 29 Message-ID: References: <20030802135043.I1129__42103.1473939822$1059860239@minotaur.apache.org> <3F73AC95.5070506@bull-enterprises.com> <3F7FA58F.3070908@bull-enterprises.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en In-Reply-To: Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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