New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM: Fast array implementation #2423
Conversation
545a333
to
4f3a702
Compare
@Krovatkin @commonlisp @arunetm You guys might be interested in this |
lib/Runtime/Library/ArrayBuffer.cpp
Outdated
{ | ||
if (newBufferLength == this->bufferLength) | ||
{ | ||
return this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeHolman I don't fully understand the spec for TransferInternal.
Must I always return a new ArrayBuffer or returning the current one is valid if the buffer doesn't change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should always return a new ArrayBuffer
@Cellule we are very much so! Thank you very much for a heads-up. We have high hopes that this change will improve some benchmark numbers 🎆 |
ping |
Create WebAssemblyArrayBuffer that forces to use VirtualAlloc on x64 Windows
Change the type of config flag for WasmFastArray
847d3a2
to
2c70ea6
Compare
{ | ||
return false; | ||
if (isAsmJs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should make it more clear that this also will include wasm, e.g. by renaming this var
} | ||
else if (isWasm) | ||
{ | ||
JavascriptError::ThrowWebAssemblyRuntimeError(func->GetScriptContext(), JSERR_InvalidTypedArrayIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotta say, i'm kind of amazed that this "just works"
f18d92f
to
2982cfa
Compare
Merge pull request #2423 from Cellule:wasm/fastarray Closes #1888 Related #2100 This PR implements the fast array (aka 8GB array) for WebAssembly on Windows x64. I have put the feature under a flag (turned on by default) to help with testing and possibly debugging future issues. This creates a new type of ArrayBuffer, `WebAssemblyArrayBuffer ` which, since the creation is controlled within WebAssembly, always allocate the buffer in virtual memory regardless of size or asm.js constraint.
Closes #1888
Related #2100
This PR implements the fast array (aka 8GB array) for WebAssembly on Windows x64.
I have put the feature under a flag (turned on by default) to help with testing and possibly debugging future issues.
This creates a new type of ArrayBuffer,
WebAssemblyArrayBuffer
which, since the creation is controlled within WebAssembly, always allocate the buffer in virtual memory regardless of size or asm.js constraint.Performance data from the console version of the unity benchmark
This change is