[Webkit-unassigned] [Bug 159385] ECMAScript 2016: %TypedArray%.prototype.includes implementation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jul 2 02:15:03 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=159385
Caio Lima <ticaiolima at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #282639|Patch |RFC Patch
description| |
--- Comment #3 from Caio Lima <ticaiolima at gmail.com> ---
Comment on attachment 282639
--> https://bugs.webkit.org/attachment.cgi?id=282639
RFC Patch
This Patch contains the implementation of JavaScript version and also the C++ version. I've made a benchmark with this code:
let a = new Float64Array(100);
a.fill(1);
for (let i = 0; i < 100000000; i++) {
a.includes(0);
}
The idea is reproduce the worst case, since it is going to compare with all array elements. These are the configurations of runs:
----------C++ Implementation----------
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=false time run-jsc includes-benchmark.js
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
16.36 real 16.04 user 0.16 sys
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=true time run-jsc includes-benchmark.js
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
13.71 real 13.40 user 0.16 sys
----------JS Wraper Implementation----------
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=false time run-jsc includes-benchmark.js
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
345.25 real 343.33 user 1.24 sys
Caios-MacBook-Pro:js-tests caiolima$
Caios-MacBook-Pro:js-tests caiolima$ JSC_useJIT=true time run-jsc includes-benchmark.js
Running 1 time(s): DYLD_FRAMEWORK_PATH=/Users/caiolima/open_projects/WebKit/WebKitBuild/Release /Users/caiolima/open_projects/WebKit/WebKitBuild/Release/jsc includes-benchmark.js
12.54 real 12.22 user 0.23 sys
What I think is the C++ implementation has better LLInt - JIT balance, since it performs well with and without JIT. However, When the javascript wrapper is JITed,it performs better than the C++ version JITed. What do you guys think about it. Also, I am open to new Benchmark ideas.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160702/f3d5647a/attachment.html>
More information about the webkit-unassigned
mailing list