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

cli-support: Remove Node.js specific passStringToWasm #2310

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

josephlr
Copy link
Contributor

@josephlr josephlr commented Sep 15, 2020

Reverts #1391 (CC #1313)

Now that Node has encodeInto it can use the same path as the normal Web
Browser code (that avoids calling into the C++ code, see #1470 ). Node 12,13, and 14
have this method, so it is now fairly well supported.

@alexcrichton @RReverser, what benchmarks should I run to see if this is actually a speedup for ASCII strings? It looks like the existing benchmarker framework is intended for the Web Broswer.

Signed-off-by: Joe Richey [email protected]

Now that Node has encodeInto it can use the same path as the normal Web
Browser code (that avoids calling into the C++ code). Node 12,13, and 14
have this method, so it is now fairly well supported.

We should check to see if this is actually a speedup for ASCII strings

Signed-off-by: Joe Richey <[email protected]>
@alexcrichton
Copy link
Contributor

Sounds reasonable to me, thanks!

@alexcrichton alexcrichton merged commit 6dd8f1c into rustwasm:master Sep 15, 2020
@RReverser
Copy link
Member

what benchmarks should I run to see if this is actually a speedup for ASCII strings?

I don't think it should, because we already used Buffer.write in Node.js. While it was Node-specific, it provided same functionality as the experimental encodeInto in browsers - writing to an existing memory view.

@josephlr
Copy link
Contributor Author

what benchmarks should I run to see if this is actually a speedup for ASCII strings?

I don't think it should, because we already used Buffer.write in Node.js. While it was Node-specific, it provided same functionality as the experimental encodeInto in browsers - writing to an existing memory view.

Oh I mainly meant the initial ASCII loop (that's just pure JS) that occurs before encodeInto that was added in #1470, but not for Node.

@josephlr josephlr deleted the node branch September 15, 2020 14:46
@RReverser
Copy link
Member

Ah right, that might have some impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants