Skip to content

Commit

Permalink
Updated build options to improve performance on esp-idf 4.4/5.x
Browse files Browse the repository at this point in the history
Starting with esp-idf 4.4, build options `-fno-jump-tables -fno-tree-switch-conversion` are always used. [1]

This is very bad for us because most emulators rely on switches being converted to jump tables.

This patch brings performance back to parity with 4.3.

1. https://github.com/espressif/esp-idf/releases/tag/v4.4:

> Always compile with -fno-jump-tables -fno-tree-switch-conversion by default. This could results in performance regression for code that relies heavily on this optimization. See api-guides/memory-types.rst for how to enable it for specific source files if necessary.
  • Loading branch information
ducalex committed Aug 27, 2024
1 parent 6d5482a commit dcc2e17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ macro(rg_setup_compile_options)
component_compile_options(
-D${RG_BUILD_TARGET}=1
-DRETRO_GO=1
-fjump-tables -ftree-switch-conversion
${ARGV}
)

Expand Down

0 comments on commit dcc2e17

Please sign in to comment.