Skip to content

Add pre-init ICs#883

Closed
bnoordhuis wants to merge 1 commit into
quickjs-ng:masterfrom
bnoordhuis:preinit-ic
Closed

Add pre-init ICs#883
bnoordhuis wants to merge 1 commit into
quickjs-ng:masterfrom
bnoordhuis:preinit-ic

Conversation

@bnoordhuis

Copy link
Copy Markdown
Contributor

Defer creating the inline cache once, to avoid unprofitable busywork for JS code that only executes once.

It's at best a qualified success. It succeeds at keeping the memory and CPU footprint of execute-once code down but it slows down the babel benchmark from the web-tooling-benchmark suite by 500% because that benchmark is all about property access on tree structures.

Other benchmarks from the suite are unaffected, neither faster or slower, with the possible exception of the terser benchmark, which is a few percent slower for the same reason as the babel one, only much less pronounced.

Refs: #876


Opened as a draft as a discussion starter because it probably shouldn't land as-is.

Defer creating the inline cache once, to avoid unprofitable busywork
for JS code that only executes once.

It's at best a qualified success. It succeeds at keeping the memory and
CPU footprint of execute-once code down but it slows down the babel
benchmark from the web-tooling-benchmark suite by 500% because that
benchmark is all about property access on tree structures.

Other benchmarks from the suite are unaffected, neither faster or
slower, with the possible exception of the terser benchmark, which
is a few percent slower for the same reason as the babel one, only
much less pronounced.
@bnoordhuis

Copy link
Copy Markdown
Contributor Author

Closing since we're going forward with #884.

@bnoordhuis bnoordhuis closed this Feb 6, 2025
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