Skip to content
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 #2100

Closed
wants to merge 2 commits into from

Conversation

Cellule
Copy link
Contributor

@Cellule Cellule commented Nov 28, 2016

This removes the bounds check in jited code on x64 Windows for heap access.

I targeted this change against release/1.4 to get the review going.
We should discuss if we want to push this change to the release branch or if we should keep it in master

Fixes #1888

Since we have more control on how the buffer is created in WebAssembly then asm.js, I decided to create the class WebAssemblyArrayBuffer which would

  • allocate 8G instead of 4G of virtual memory.
  • always create a buffer even if the initial size is 0.
  • always use virtual memory when transfering the buffer.

@MikeHolman Are there other places other than TransferInternal that can detach the buffer ?

@liminzhu @LouisLaf @EdMaurer Do we want to integrate this change to release/1.4 since it has a massive perf benefit or is it too late ?


This change is Reviewable

Create WebAssemblyArrayBuffer that forces to use VirtualAlloc on x64 Windows
@Cellule
Copy link
Contributor Author

Cellule commented Nov 29, 2016

Closing for now.

@Cellule Cellule closed this Nov 29, 2016
@Cellule Cellule deleted the wasm/fastarray branch January 18, 2017 19:48
chakrabot pushed a commit that referenced this pull request Feb 17, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants