Optimization Topics/Exercise 06: Difference between revisions

From Wiki**3

< Optimization Topics
(Created page with "Considere a seguinte função em C: <c> int main() { int a[10], i = 1; a[0] = 0; while (i < 10) a[i++] = a[i-1] + 2 * i - 1; return 0; } </c> # Identifique os...")
 
 
Line 1: Line 1:
Considere a seguinte função em C:
#REDIRECT [[ist:Optimization Topics/Exercise 06]]
 
<c>
int main() {
  int a[10], i = 1;
  a[0] = 0;
  while (i < 10)
    a[i++] = a[i-1] + 2 * i - 1;
  return 0;
}
</c>
 
# Identifique os blocos básicos.
# Que optimizações poderiam ser efectuadas?

Latest revision as of 18:19, 6 December 2018