commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: Re: [lang] enhanced version of Class.forName
Date Wed, 07 Sep 2005 06:28:50 GMT
Hi Henning,

Henning P. Schmiedehausen wrote on Tuesday, September 06, 2005 6:09 PM:

[snip]

> => charAt is 3-4 times faster when not matching and almost twice as
>    fast when matching. For the short case it is even faster.
> 
> Get Test Class Source code from
> http://henning.schmiedehausen.org/code/EndOfTest.java
> 
> Another interesting point is that a method call seems to
> impose just a very small overhead. Even though the charAt
> test needs three of them in the worst case (length() and 2x
> charAt()), it is still faster than the single endsWith() method call.

Funny. Just by reviewing the code, I would not have expected to get sooo much difference.

> 	Best regards
> 		Henning (Micro-Optimizer and general nit-picker. ;-) )

<g>

- Jörg

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