-
-
Notifications
You must be signed in to change notification settings - Fork 407
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 by Bors] - Lift InternalObjectMethods
from Object
#2790
Conversation
JsObject
internal methods from Object
InternalObjectMethods
from Object
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #2790 +/- ##
==========================================
+ Coverage 51.10% 51.37% +0.26%
==========================================
Files 416 416
Lines 41506 41255 -251
==========================================
- Hits 21213 21195 -18
+ Misses 20293 20060 -233
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Benchmark for ed2f008Click to view benchmark
|
Benchmark for 8e418f7Click to view benchmark
|
It seems like it slightly improved perf on some tests, but I'll try to run https://bellard.org/quickjs/bench.html to see our current perf score. |
Ok, ran QuickJS's benchmarks and got the following results: MainRESULT Richards 29.7 PRRESULT Richards 30.8 So it is safe to say the changes did improve performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! :)
Both this and #2723 change the |
I think It's fine, since It's one of the things that needs to be refactored so the builtins work well with shapes |
Yeah, I'd also argue that this PR barely changes the object creation API, so it'll be easier to rebase if the smaller change is merged first. |
Benchmark for daf4463Click to view benchmark
|
Benchmark for 3f8b8e8Click to view benchmark
|
Benchmark for 2cf9c0dClick to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good to me :) thanks!
bors r+ |
This Pull Request lifts the `InternalObjectMethods` vtable from `Object`, which should technically improve performance, since we now won't need to call `borrow` to use any of the internal methods, but let's see what the benchmarks show. It changes the following: - Adds a new `VTableObject` struct, containing the old `GcRefCell<Object>` and the lifted `InternalObjectMethods`. - Changes the definition of `JsObject` to `Gc<VTableObject>`. Note that this means the `InternalObjectMethods` are accessible through the `Gc` pointer. - Reestructures intrinsic initialization and initialization APIs to accommodate this change.
Pull request successfully merged into main. Build succeeded: |
InternalObjectMethods
from Object
InternalObjectMethods
from Object
This Pull Request lifts the
InternalObjectMethods
vtable fromObject
, which should technically improve performance, since we now won't need to callborrow
to use any of the internal methods, but let's see what the benchmarks show.It changes the following:
VTableObject
struct, containing the oldGcRefCell<Object>
and the liftedInternalObjectMethods
.JsObject
toGc<VTableObject>
. Note that this means theInternalObjectMethods
are accessible through theGc
pointer.