Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart VM compiler optimizations: do not box integer at the end of each loop iteration. #13875

Closed
ghost opened this issue Oct 7, 2013 · 5 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Oct 7, 2013

In loop of 'runInts' variable 'sum' is boxed at the end of each loop iteration. Instead box it only outside the loop, similarly to doubles.

runInts(a, b) {
  var sum = 0;
  for (int i = 0; i < 10000; i++) {
    sum = sum + a - b;
  }
  return sum;
}

main() {
  for (int i = 0; i < 100; i++) {
    runInts(1, 0x7FFFFFFF);
  }
}

@iposva-google
Copy link
Contributor

Issue #13869 has been merged into this issue.

3 similar comments
@rakudrama
Copy link
Member

Issue #13869 has been merged into this issue.

@iposva-google
Copy link
Contributor

Issue #13869 has been merged into this issue.

@fsc8000
Copy link
Contributor

fsc8000 commented Nov 10, 2014

Issue #13869 has been merged into this issue.

@ghost ghost assigned fsc8000 Nov 10, 2014
@fsc8000
Copy link
Contributor

fsc8000 commented Nov 2, 2015

Fixed by 8adefa8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants