int sum = 0; 
for (int i = 0; i < 10; i++) { 
   sum = sum + i; 
}
You are given a code, you need to suggest an improvement for its performance.
One possible improvement for this code's performance is to replace the loop with the mathematical formula for calculating the sum of an arithmetic series:

int n = 10;
int sum = (n*(n-1))/2;