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

performance: implement jump table for switch statement #17690

Closed
DartBot opened this issue Mar 21, 2014 · 2 comments
Closed

performance: implement jump table for switch statement #17690

DartBot opened this issue Mar 21, 2014 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-obsolete Closed as the reported issue is no longer relevant type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Mar 21, 2014

This issue was originally filed by @tatumizer


Dart doesn't generate jump table for simple switch statement like
switch(n) {
case 0:
  ...
case 1:
  ...
...
case 5:
  ...
}
 CMP commands are issued instead.
You are certainly aware of it, but I couldn't find an "issue".

@DartBot
Copy link
Author

DartBot commented Mar 21, 2014

This comment was originally written by @tatumizer


Compiler can see that all constants are different, and they are dense. Nothing stops from generating jump table for it.
The fact that repeated constants are not flagged as error is strange indeed, but this is unrelated to the one I complained about.
(Even for repeated cases, second one will never be executed, so it can be just ignored by compiler while deciding whether to generate jump table or not).

@floitschG
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-VM, Triaged labels.

@DartBot DartBot added Type-Enhancement area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Mar 22, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Feb 29, 2016
@lrhn lrhn added the closed-obsolete Closed as the reported issue is no longer relevant label Sep 14, 2020
@lrhn lrhn closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-obsolete Closed as the reported issue is no longer relevant type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants