Closed Bug 1121877 Opened 11 years ago Closed 2 months ago

Evaluate OpenCV performance with asm.js - operation bitwise_and/or/not/xor

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kaku, Unassigned)

References

Details

Attachments

(4 files)

This is a case study of bug 1116674. The bitwise_and, bitwise_or, bitwise_not and bitwise_xor operations of asm.js version OpenCV are slow and share the same pattern. There is much more performance-drop while dealing with uint8 and sint8 data type whcih get better oprtimization in native environment. The benchmark table could is here: https://docs.google.com/a/mozilla.com/spreadsheets/d/1w8gr1_q_dQclTaGyiMtAhlwj_5_HPVKbHWfwUszPU40/edit#gid=1173776577
The runnable HTML/JS files and profiling file of cv::bitwise_and operarion to different datatypes. The operation description: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=bitwise_and#bitwise-and
The runnable HTML/JS files and profiling file of cv::bitwise_not operarion to different datatypes. The operation description: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=bitwise_and#bitwise-not
The runnable HTML/JS files and profiling file of cv::bitwise_or operarion to different datatypes. The operation description: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=bitwise_and#bitwise-or
The runnable HTML/JS files and profiling file of cv::bitwise_xor operarion to different datatypes. The operation description: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=bitwise_and#bitwise-xor
Hi Luke and Alon, This is a new case. Please take a look to the attached files. Thanks.
Flags: needinfo?(azakai)
Flags: needinfo?(luke)
Blocks: 1116674
Once thing I noticed, just running this in the FF builtin profiler, is that about 11% of the time is spent in ___muldi3 which seems to be int64-related. It looks like this is called from an OpenCV function randBits. Looking at the names of some of the symbols in the callstack ("warmup_impl" and "TestBase") it's possible these aren't part of the measured time of the benchmark, though, they are just used to set up the workload? Looking at the main loop, I don't see any flagrant problems, so it sounds like this could be another instance of the problem in bug 1121860.
Flags: needinfo?(luke)
Hmm, profiler seems broken for me on nightly, so I can't see which are the hot functions here. Luke, does it work for you? When I stop profiling, it says "loading" and then nothing happens.
Flags: needinfo?(azakai)
I think that's an e10s problem; worked for me when I opened a non-e10s window.
Ah, thanks, it does work in non-e10s. Yes, nothing odd in the asm.js output, looks reasonable. Perhaps natively it can vectorize or do something else impressive?
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Severity: normal → S3

ASM.js is replaced by WASM these days.

Status: REOPENED → RESOLVED
Closed: 7 years ago2 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: