Optimize array.reduce, array.reduceRight to sealed, frozen object
Use FastJSArrayForRead pattern. Add test of array.reduce, array.reduceRight for non-extensible, sealed, frozen objects similar to mjsunit/array-reduce.js ~3x perf improvement in JSTests/ObjectFreeze micro-benchmark Before: ArrayReduce ArrayReduce-Numbers(Score): 0.0740 ArrayReduceRight ArrayReduceRight-Numbers(Score): 0.0767 After: ArrayReduce ArrayReduce-Numbers(Score): 0.249 ArrayReduceRight ArrayReduceRight-Numbers(Score): 0.261 Bug: v8:6831 Change-Id: I98f54f010256993fcd05bb24be968fb2d0f5c966 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1656851 Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com> Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#62158}
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please
register
or
sign in
to comment