Bug 148267 - Investigate asm.js memory growth perf
Summary: Investigate asm.js memory growth perf
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 16:59 PDT by Alon Zakai
Modified: 2015-08-23 04:51 PDT (History)
2 users (show)

See Also:


Attachments
Fannkuch benchmark with memory growth (284.88 KB, application/javascript)
2015-08-20 16:59 PDT, Alon Zakai
no flags Details
Fannkuch benchmark without memory growth (282.46 KB, application/javascript)
2015-08-20 17:34 PDT, Alon Zakai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alon Zakai 2015-08-20 16:59:32 PDT
Created attachment 259529 [details]
Fannkuch benchmark with memory growth

Attached is an example benchmark of fannkuch compiled by emscripten with asm.js memory growth. That means that the typed arrays representing memory (HEAP8, etc.) are modifiable, we replace them when we resize memory. (This uses ArrayBuffer.transfer when present, but does not depend on that.)

This is efficient in Firefox and Edge, as part of asm.js validation and the AOT compilation approach. On Chrome it is known to be slow,

https://code.google.com/p/v8/issues/detail?id=3907

Filip asked me to file this issue here, to investigate performance in JavaScriptCore.

Note that memory growth is disabled by default in emscripten, so probably not much code out there uses it. If we can see that it's fast across the board, it would be nice to enable it, as it lets people compile their code without deciding ahead of time on the maximum amount of memory.
Comment 1 Alon Zakai 2015-08-20 17:34:01 PDT
Created attachment 259537 [details]
Fannkuch benchmark without memory growth

For comparison, Fannkuch without memory growth.