Bug 186193
Summary: | [JSC] NewArrayBuffer should have non-CoW mode | ||
---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | fpizlo, keith_miller, mark.lam, msaboff, saam, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 186724 |
Yusuke Suzuki
In some program, array created by new_array_buffer is not immutable (I think Kraken/crypto-aes and SixSpeed spread-literal.es5 are).
But ArrayifyToStructure's array copying is really slow compared to non CoW array creation in NewArrayBuffer.
I think we should have non-CoW mode for NewArrayBuffer / new_array_buffer. ArrayAllocationProfile should carefully profile the use of resulted array, and tell us whether using CoW mode is profitable.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Saam Barati
Why is arrayify to structure slow?
Keith Miller
It seems like if this is a problem the fix is to make Arrayification faster. Since the total amount of work duplicating the butterfly should be the same either way, I don't see any obvious reason to eagerly copy.