Skip to content

perf(transpile): default to the sync fast path, dedup core modules - #2598

Closed
vados-cosmonic wants to merge 5 commits into
bytecodealliance:mainfrom
vados-cosmonic:perf/sync-fast-path-default-module-dedup
Closed

vados-cosmonic wants to merge 5 commits into
bytecodealliance:mainfrom
vados-cosmonic:perf/sync-fast-path-default-module-dedup

Conversation

@vados-cosmonic

Copy link
Copy Markdown
Collaborator

Two changes to the default output of transpile:

  • Sync fast path on by default. perfSyncFastPath now defaults to true, so calls of synchronous functions on eligible components skip creating a task. Components that are not eligible are unaffected. --no-perf-sync-fast-path (or perfSyncFastPath: false) restores a task for every call. The one documented difference, the message a guest sees when it catches a host throwing null or undefined, now applies by default.
  • Repeated core modules are emitted once. A composition can embed byte-identical core modules more than once. The bindings now emit and compile one copy and instantiate it as often as needed, instead of writing and compiling each copy separately.

A composition can embed the same core module more than once. Each copy after the
first now reuses the first copy's compiled module instead of being emitted as a
separate file and compiled again.
perfSyncFastPath is now on unless it is set to false. Calls of synchronous functions
on eligible components skip creating a task.
`jco transpile` now uses the sync fast path unless `--no-perf-sync-fast-path` is given,
whatever the default of the jco-transpile release it uses.
@vados-cosmonic

Copy link
Copy Markdown
Collaborator Author

Superseded by #2597, which contains all five commits from this PR. The combined branch passed the default and opt-out fast-path checks and the repeated-core-module tests for both ES-module and factory output.

@vados-cosmonic
vados-cosmonic deleted the perf/sync-fast-path-default-module-dedup branch December 2, 2026 11:48
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