Status: New
Owner: ----
New issue 2678 by [email protected]: emscripten box2d.js performance
issue
http://code.google.com/p/v8/issues/detail?id=2678
V8 has a poor performance on the box2d.js benchmark from emscripten
(attached below), 12X slower than native. The MSPF(ms per frame) is about
48ms and the native is only ~5 ms on my Linux desktop.
Through analysis, the root cause of the performance issue lies on a very
big function named bO in box2d.js which is generated by emscripten (more
than 40k chars minified JavaScript code with 6 depth loop)
So before V8 is able to go through all of its code, it triggers V8 OSR
optimization. That leads to V8 insert quite a lot soft deoptimize in the
JIT code for missing type info of non-run code.
Statically, V8 spends eight time OSR optimizations due to soft deoptimize
to finish its first call. This makes bO function to be disabled
optimization and run its non-optimize code forever soon because its
optimization count quickly exceeds the FLAG_max_opt_count (10 by default).
while bO function will be called nearly 400 times in box2d.js benchmark,
being disable optimized early leads to the very poor performance.
One proposal to fix this issue is to isolate the soft deoptimize from other
kinds of deoptimizes, like type check fail etc. It is better that the soft
deoptimize does not affect the total opt count.
Attachments:
box2d.js 318 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.