WebAssembly [dosbox-x] with exception-handling terrible performace comparing to other browsers
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
People
(Reporter: caiiiycuk, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
Hi, I am author a js-dos project. I am ported dosbox-x to web assembly, it's core uses exception-handling feature of webassembly. To estimate performance I have a test dos program that I run inside emulator. This test reports an a VAX number.
I attached the zip with test page. Just press "Start direct" or "Start in worker" to start test. After some amount of time (like 20-30sec) test will print the report, like this:
0: 80000 runs, browser time 1275.300000 ms, VAX rating 35.703095
0: sleep p/sec 58 , avg cycles p/ms: 32030
"VAX" - is a test result, and "avg cycles p/ms" - how many emulation cycles did the browser perform.
Actual results:
When I run this test on FF 109, 110.0b8, the performance is really terrible, like
VAX - 0.14, avg cycles p/ms - 113
Evenmore from time to time "unreachable executed" is throwed (should not happen!)
Expected results:
On same PC results for other browsers:
Chrome:
VAX - ~35, avg cycles p/ms ~32000
Safari:
VAX - ~20, avg cycles p/ms ~19000
If I run simmilar core without eh, the results for firefox is VAX 50-70, so I am guessing that it's related to exception handling feature.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
The severity field is not set for this bug.
:rhunt, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Profile captured on Linux x86 and Firefox 110.0.
Comment 3•3 years ago
|
||
I can reproduce on Linux x86_64 and Firefox 110. I had to run a local http server to test this page.
With Firefox:
0: 10000 runs, browser time 10673.000000 ms, VAX rating 0.533263
0: sleep p/sec 61 , avg cycles p/ms: 411
0: 10000 runs, browser time 9601.000000 ms, VAX rating 0.592805
0: sleep p/sec 62 , avg cycles p/ms: 425
With Chrome:
0: 10000 runs, browser time 720.900000 ms, VAX rating 7.895020
0: sleep p/sec 63 , avg cycles p/ms: 3360
A profile is attached for the firefox run.
Comment 4•2 years ago
|
||
After applying patch from bug 1837686, the results are about the same between FF and Chrome.
Comment 5•2 years ago
|
||
Resolving as fixed from bug 1837686.
Description
•