On Mon, 2008-02-04 at 15:48 +0000, Ian Rogers wrote:
> Hi,
> 
> xalan performs 1.4 million char array clones per iteration of the normal 
> size DaCapo benchmark. All of the character array clones are coming from 
> java.lang.String. The attached patch changes the use of char[].clone 
> (which maps to java.lang.Object.clone) to a helper method that allocates 
> the character array and then array copies from the source to the new 
> array. On the Jikes RVM I get the following performance results from 10 
> iterations of DaCapo using the large data set size:
> 
> current java.lang.String using char[].clone:
> run 1: 99157ms
> run 2: 98700ms
> run 3: 97927ms
> 
> patched java.lang.String using the helper routine:
> run 1: 97710ms
> run 2: 97406ms
> run 3: 96762ms
> 
> The speed up is between 0.22% and 1.2%. Do people think using the helper 
> is a sensible change?

Hi Ian!

Does the speedup come from the ability to inline the help method, while
the clone() cannot?

- twisti

Reply via email to