harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5584) [drlvm][jit][opt][performance] Inliner heuristics improvements: hottness and instance initializer bonuses
Date Fri, 07 Mar 2008 16:39:47 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576267#action_12576267
] 

Aleksey Shipilev commented on HARMONY-5584:
-------------------------------------------

H5584-inliner-heuristics.patch performance measurements (ThinkPad T61p / Windows XP SP2).
Baseline configuration: shade.r631623.P.pC.clean/bin/java -Xms512M -Xmx512M -Xem:server jnt.scimark2.commandline
-large

==== Clean: ====

Composite Score: 253.32
FFT (1048576): 47.19
SOR (1000x1000):   511.14
Monte Carlo : 51.45
Sparse matmult (N=100000, nz=1000000): 399.68
LU (1000x1000): 257.10

==== hotnessBonus implementation ==== 

Composite Score: 249.87
FFT (1048576): 48.90
SOR (1000x1000):   498.18
Monte Carlo : 65.091
Sparse matmult (N=100000, nz=1000000): 383.23
LU (1000x1000): 253.96

====  hotnessBonus + instanceInitializer ==== 

Composite Score: 260.43
FFT (1048576): 48.57
SOR (1000x1000):   493.06
Monte Carlo : 102.26
Sparse matmult (N=100000, nz=1000000): 399.68
LU (1000x1000): 258.598

------------------------------

That is, 2x improvement for MonteCarlo sub-benchmark and +4% to composite score.



> [drlvm][jit][opt][performance] Inliner heuristics improvements: hottness and instance
initializer bonuses
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5584
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5584
>             Project: Harmony
>          Issue Type: Improvement
>         Environment: all
>            Reporter: Aleksey Shipilev
>         Attachments: H5584-inliner-heuristics.patch
>
>
> During the profiling of Scimark2 [1] it was found that inliner misses the inline opportunities
for monte_carlo. 
> This is the code for hottest method:
> 	public static final double integrate(int Num_samples)
> 	{
> 		Random R = new Random(SEED);
> 		int under_curve = 0;
> 		for (int count=0; count<Num_samples; count++)
> 		{
> 			double x= R.nextDouble();
> 			double y= R.nextDouble();
> 			if ( x*x + y*y <= 1.0)
> 				 under_curve ++;
> 			
> 		}
> 		return ((double) under_curve / Num_samples) * 4.0;
> 	}
> Problems are:
>  1. nextDouble is not inlined
>  2. nextDouble is internally synchronized 
> Attached patch solves these two problems:
>  1. fixing hotness bonus calculation. This is the issue Random.nextDouble() hit on: this
method called in hot cycle and missing inline opportunity due to glitch in scaling function,
which should be more additive rather than multiplicative.
>  2. introducing instance initializer bonus. This helps to inline constructor with all
corresponding methods to help escape analysis with eliminating the synchronization in Random.nextDouble().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message