Open Bug 1121908 Opened 9 years ago Updated 2 years ago

Evaluate OpenCV performance with asm.js - operation convertTo

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

REOPENED

People

(Reporter: kaku, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This is a case study of bug 1116674.

The convertTo operations of asm.js version OpenCV convert the underlying data type of an image array form one type to another. This is a basic operation, however it gets dramatic performance drop while converting floating point data into non-floating point data. I know this case is already being handled now, but I would like to provide some real case testing data, which hope to be helpful.
The runnable HTML/JS files and profiling file of cv::convertTo function operating on converting 32F data to other types.

The operation description: http://docs.opencv.org/modules/core/doc/basic_structures.html?highlight=convertto#mat-convertto
Blocks: 1116674
Hi Luke and Alon, 

This is a new case. 
Please take a look to the attached files.
Thanks.
Flags: needinfo?(luke)
Flags: needinfo?(azakai)
Thanks for the isolated test cases!  I see you are using a newer build with in-asm.js _lrint/_rint.  Still, the profiles show an enormous amount of time in these two functions.  Considering that, as I said in the other bug, glibc is getting to implement both of these functions with a single instruction and Emscripten is emitting a bunch more than that in the bodies of these two functions, it makes sense that we're disproportionately worse than native here.  By the way, what is the asm.js / native ratio here?

Second, to help us prioritize, in the overall OpenCV picture, how common are these operations that are being microbenchmarked here?
Flags: needinfo?(luke)
Yes, prioritizing this is important. We normally don't like to hack up musl, and prefer to stay close to upstream. But if this is a big problem, we might.
Flags: needinfo?(azakai)
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: 6 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: