mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibJS: Avoid function call if @@hasInstance is default implementation
This makes the instanceof operator signficantly faster by avoiding a generic function call to @@hasInstance unless it has been overridden. 1.15x speed-up on Octane/earley-boyer.js
This commit is contained in:
parent
5a7b0a07cb
commit
0e4450f4b3
Notes:
github-actions[bot]
2025-10-13 15:18:08 +00:00
Author: https://github.com/awesomekling
Commit: 0e4450f4b3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6463
5 changed files with 12 additions and 1 deletions
|
@ -26,6 +26,7 @@ namespace JS::Bytecode {
|
|||
O(MathSin, math_sin, Math, sin, 1) \
|
||||
O(MathCos, math_cos, Math, cos, 1) \
|
||||
O(MathTan, math_tan, Math, tan, 1) \
|
||||
O(OrdinaryHasInstance, ordinary_has_instance, InternalBuiltin, ordinary_has_instance, 1) \
|
||||
O(ArrayIteratorPrototypeNext, array_iterator_prototype_next, ArrayIteratorPrototype, next, 0) \
|
||||
O(MapIteratorPrototypeNext, map_iterator_prototype_next, MapIteratorPrototype, next, 0) \
|
||||
O(SetIteratorPrototypeNext, set_iterator_prototype_next, SetIteratorPrototype, next, 0) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue