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

Unable to reproduce argon2.wasm file found on website #87

Open
blake-regalia opened this issue Dec 12, 2022 · 5 comments
Open

Unable to reproduce argon2.wasm file found on website #87

blake-regalia opened this issue Dec 12, 2022 · 5 comments

Comments

@blake-regalia
Copy link

blake-regalia commented Dec 12, 2022

Building from the master branch with the latest emsdk produces a completely different binary than what is hosted on the demo website. At cursory glance of the WAT formats, the bin from the website (shown on the left) has more exports and seems to target 64-bit platform whereas the output from master (shown on the right) has fewer exports and does not use i64 anywhere.

Screen Shot 2022-12-11 at 18 05 28

The reason I discovered this was because I have not been able to get nearly the same performance (more than 10x slower) compared to the WASM found on the demo site. Was this compiled using different flags? I have tried building on several different platforms but get the same results.

EDIT: I see that the website is CI built via GH workflow, I wonder if the toolchain has changed significantly since then, since I cannot explain the differences.

@quexten
Copy link

quexten commented Feb 16, 2023

@blake-regalia Have you ever figured this out? I'm curious too.

@blake-regalia
Copy link
Author

no 😢

@quexten
Copy link

quexten commented Feb 21, 2023

Ok, so I compiled the latest master branch, and the resulting binary was actually faster than the one on the website. I compiled using the latest emscripten docker image (or in my case podman):
sudo podman run --rm -v $(pwd):/src:Z -u $(id -u):$(id -g) --privileged -it emscripten/emsdk /src/build.sh

@quexten
Copy link

quexten commented Feb 21, 2023

Here, only difference is recompilation using latest emscripten:

image

@blake-regalia
Copy link
Author

Thanks, i've gotten it to compile correctly now. Although the performance is now the same as the website on my machine at least.

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

No branches or pull requests

2 participants