Skip to content

Commit

Permalink
feat: optimize instruction decoding primary switch into jump tables
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Oct 14, 2024
1 parent c5711c8 commit 5ec2ff8
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 308 deletions.
5 changes: 2 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,8 @@ ifneq (,$(filter gcc,$(CC)))
# but we don't use -O3 because it enables some other flags that are not worth for the interpreter.
INTERPRET_CXXFLAGS+=-fgcse-after-reload -fpredictive-commoning -fsplit-paths -ftree-partial-pre
endif
# Disable jump tables, because it degrades the instruction decoding performance in the interpret loop,
# since it generates a memory indirection that has a high cost in opcode switches.
INTERPRET_CXXFLAGS+=-fno-jump-tables
# Enable large jump tables to improve performance of instruction decoding in interpret.cpp
INTERPRET_CXXFLAGS+=-fjump-tables --param jump-table-max-growth-ratio-for-speed=4096
endif

# Link time optimizations
Expand Down
Loading

0 comments on commit 5ec2ff8

Please sign in to comment.