[JSC] A bit performance improvement for Object.assign by cleaning up code
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2018 18:28:28 +0000 (18:28 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2018 18:28:28 +0000 (18:28 +0000)
commit6b3fa49545c162b2f8b92d042803a0929fe07d53
treef6c9b36be82901f71067bd563af6ffd535485a8d
parent407fd46f8c9e28e5d47f0d10e9c190ab50ea75c9
[JSC] A bit performance improvement for Object.assign by cleaning up code
https://bugs.webkit.org/show_bug.cgi?id=187852

Reviewed by Saam Barati.

We clean up Object.assign code a bit.

1. Vector and MarkedArgumentBuffer are extracted out from the loop since repeatedly creating MarkedArgumentBuffer is costly.
2. canDoFastPath is not necessary. Restructuring the code to clean up things.

It improves the performance a bit.

                            baseline                  patched

object-assign.es6      237.7719+-5.5175          231.2856+-4.6907          might be 1.0280x faster

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorAssign):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ObjectConstructor.cpp