Closed Bug 837832 Opened 12 years ago Closed 1 year ago

Labeled breaks slower than normal breaks in emscripten code

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: azakai, Unassigned)

References

Details

Attachments

(2 files)

Attached file smaller but slower
Attached are two versions of fasta, run them with file.js 19000000 The only difference between them is that one has label: do { if (..) { } } while(0); while the other has label: if(..) { ... } the second is more compact which is good for code size. However it runs much more slowly, 2.5x. Aside from putting the label directly on the if, the other change which is necessary is to make all breaks to that label labeled breaks, since a do-while can have a raw |break| but an if cannot. Are labeled breaks slower perhaps?
Attached file bigger but faster
Note: diff -w is useful to see that only the do-while vs if and labeled breaks have changed, -w makes it ignore the changed indentation.
Forgot to say, there is no speed difference in v8 between the two versions.
IonMonkey currently only handles labeled breaks if the label is immediately followed by a loop (bug 684384). So we abort compilation of incoming.js:2608: [Abort] could not find the target of a break [Abort] aborted @ /Users/jan/dev/incoming.js:2653
Depends on: 684384
Assignee: general → nobody
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: