Skip to content

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Sep 20, 2025

Continuation of #1770

Avoid calls to TERM_COMPARE primitive for comparison with literals in OP_IS_EXACT and OP_IS_NOT_EXACT.

Current benchmark:

test JIT disabled (c06edb2) HEAD~1, JIT enabled (c06edb2) This PR (9b14b16)
erlang-tests 11.45s 10.51s 9.95s
benchmark (entire run) 17.03 15.71 (incl. compilation) 15.35s
benchmark : pingpong_speed_test 3.59s 3.20s 3.23s
benchmark : prime_speed_test 0.26s 0.21s 0.17s
benchmark : sudoku_solution_test 0.26s 1.35s (incl. compilation of sudoku_grid in 1.1s) 1.34s
benchmark : sudoku_puzzle_test 10.51s 9.23s 9.18s

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot force-pushed the w39/jit-optimize-term-compare branch from 2455897 to cca94f6 Compare September 28, 2025 07:29
@pguyot pguyot marked this pull request as ready for review September 28, 2025 07:29
@bettio bettio merged commit 323f8c1 into atomvm:main Sep 29, 2025
153 of 155 checks passed
@pguyot pguyot deleted the w39/jit-optimize-term-compare branch September 29, 2025 17:49
bettio added a commit that referenced this pull request Oct 4, 2025
Just in time compilation with aarch64 target

Continuation of:
- #1770
- #1833
- #1834
- #1835
- #1840
- #1841

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
bettio added a commit that referenced this pull request Oct 22, 2025
Just in time compilation with armv6m target

Continuation of:
- #1770
- #1773
- #1833
- #1834
- #1835
- #1890
- #1878
- #1881
- #1887

The target is suitable for Pico, Pico2 and STM32.
Benchmark test on a Pico with SMP disabled shows a speed increase from 14% to
62%.

  | native (w34/jit-arm) | emulated (main) -- d8ecc02 | %
-- | -- | -- | --
pingpong_speed_test | 17437587 | 27590085 | 37 %
prime_speed_test | 13257293 | 35212412 | 62 %
prng_test | 1128949 | 1500967 | 25 %
pi_test | 26759537 | 58693061 | 54 %
sudoku_solution_test | 6420801 | 7471461 | 14 %
sudoku_puzzle_test | 254335968 | 333834045 | 24 %

Remark: the current backend requires 64 bits floats. 32 bits floats would need
a specific variant.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants