Commit f8dc618
authored
Apparently a switch on an 8-bit quantity where all cases are
present generates a more efficient jump (doing only one indexed
memory load instead of two).
So we make opcode and use_tracing uint8_t, and generate a macro
full of extra `case NNN:` lines for all unused opcodes.
See faster-cpython/ideas#321 (comment)
1 parent d44815c commit f8dc618
File tree
4 files changed
+90
-3
lines changed- Include
- cpython
- Python
- Tools/scripts
4 files changed
+90
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1662 | 1662 | | |
1663 | 1663 | | |
1664 | 1664 | | |
1665 | | - | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1666 | 1668 | | |
1667 | 1669 | | |
1668 | 1670 | | |
| |||
5645 | 5647 | | |
5646 | 5648 | | |
5647 | 5649 | | |
5648 | | - | |
| 5650 | + | |
5649 | 5651 | | |
5650 | 5652 | | |
5651 | 5653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
132 | 139 | | |
133 | 140 | | |
134 | 141 | | |
| |||
0 commit comments