-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Make JS calls go even faster #6657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
awesomekling
merged 13 commits into
LadybirdBrowser:master
from
awesomekling:go-faster-calls-go
Nov 1, 2025
Merged
Make JS calls go even faster #6657
awesomekling
merged 13 commits into
LadybirdBrowser:master
from
awesomekling:go-faster-calls-go
Nov 1, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Great work, |
a24c954 to
00a59e8
Compare
This gets rid of a RefPtr in ExecutionContext, bringing us one step closer to destructor-less ExecutionContext.
This makes ExecutionContext trivially destructible, which means less work to do on function exit.
This means we don't have to do a bunch of math to find the next instruction boundary, and gives us a small speedup.
There's only ever one GC::Heap per process, so let's have a way to find it even when you have no context.
This is only used by ExecutionContexts owned by an HTML::ESO.
Instead of using this span, we can just use the getter that calculates the base of the register/constant/local/argument array based on the ExecutionContext's own address.
Instead of always checking if we're about to return an empty completion value in Interpreter::run_executable(), we now coerce empty completions to the undefined value earlier instead. This simplifies the most common path through run_executable(), giving us a small speedup.
We were already skipping the bounds checks on this thing anyway, so might as well shrink ExecutionContext by 8 bytes by doing this.
00a59e8 to
769c84c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Big pile of small things to reduce JS call overhead and make calls go faster!