Skip to content

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Oct 13, 2025

Continuation of #1900

Use a cache to remember tail calls that were already implemented and
replace further implementations of the same tail call with a jump to the
previous implementation.

Coverage shows that all cases are covered in libs/estdlib/src and libs/jit/src:

  • OP_RETURN: 50 misses, 1735 hits (97%)
  • OP_JUMP/OP_CALL_LAST/OP_CALL_ONLY: 656 misses, 389 hits (37%)
  • OP_CALL_LAST: 220 misses, 206 hits (48%)
  • OP_FUNC_INFO: 58 misses, 1619 hits (97%)

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 w42/factorize-tail-call-to-reduce-binary-size branch 2 times, most recently from 62813f7 to 1dc8c21 Compare October 14, 2025 06:53
@pguyot pguyot force-pushed the w42/factorize-tail-call-to-reduce-binary-size branch from 1dc8c21 to 89bf2d2 Compare October 14, 2025 19:51
pguyot added 25 commits October 19, 2025 12:45
Also enable parallel compilation (make -j3) and fix circular dependency
when building precompiled archives

Signed-off-by: Paul Guyot <[email protected]>
Signed-off-by: Paul Guyot <[email protected]>
Signed-off-by: Paul Guyot <[email protected]>
Signed-off-by: Paul Guyot <[email protected]>
Signed-off-by: Paul Guyot <[email protected]>
pguyot added 24 commits October 19, 2025 12:49
Signed-off-by: Paul Guyot <[email protected]>
Signed-off-by: Paul Guyot <[email protected]>
Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot force-pushed the w42/factorize-tail-call-to-reduce-binary-size branch from 89bf2d2 to 02fda84 Compare October 19, 2025 12:05
Use a cache to remember tail calls that were already implemented and
replace further implementations of the same tail call with a jump to the
previous implementation.

Coverage shows that all cases are covered in libs/estdlib/src and libs/jit/src:

OP_RETURN: 50 misses, 1735 hits (97%)
OP_JUMP/OP_CALL_LAST/OP_CALL_ONLY: 656 misses, 389 hits (37%)
OP_CALL_LAST: 220 misses, 206 hits (48%)
OP_FUNC_INFO: 58 misses, 1619 hits (97%)

Signed-off-by: Paul Guyot <[email protected]>
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.

1 participant