Quantcast
Channel: Intel® VTune™ Profiler (Intel® VTune™ Amplifier)
Viewing all articles
Browse latest Browse all 1347

How to optimize the following hotspot in the code reported by Vtune Amplifier?

$
0
0

The following code snippet is reported as the top hotspot :

i = some positive int
j = some positive int
L = some positive int

//j < i
x = some positive int
p = some prime number ( int)

while (i < L)
{
	arr[i] = arr[i] + x;      //this line is reported to be the hotspot
	arr[j] = arr[j] + x;
	i = i + p;
	j = j + p;
}

 

Zone: 

Thread Topic: 

How-To

Viewing all articles
Browse latest Browse all 1347

Trending Articles