Changeset 35309 in webkit for trunk/JavaScriptCore/VM/Opcode.h


Ignore:
Timestamp:
Jul 23, 2008, 5:49:46 PM (17 years ago)
Author:
[email protected]
Message:

Improve switch performance.

Reviewed by Geoff Garen and Sam Weinig.

Improve switch performance by converting to a hashmap based jump
table to avoid the sequence of dispatches that would otherwise be
needed. This results in a 9-19x performance win for string switches
based on ad hoc testing, and a 6x improvement for integer switch
statements. SunSpider reports a 1.2% progression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/Opcode.h

    r35305 r35309  
    104104        macro(op_loop_if_true) \
    105105        macro(op_loop_if_less) \
     106        macro(op_switch_imm) \
     107        macro(op_switch_char) \
     108        macro(op_switch_string) \
    106109        \
    107110        macro(op_new_func) \
Note: See TracChangeset for help on using the changeset viewer.