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

1.4.1 is adding 20kb to wasm binaries size #28

Closed
NikVolf opened this issue May 16, 2018 · 5 comments
Closed

1.4.1 is adding 20kb to wasm binaries size #28

NikVolf opened this issue May 16, 2018 · 5 comments

Comments

@NikVolf
Copy link

NikVolf commented May 16, 2018

compared to 1.4.0

@NikVolf
Copy link
Author

NikVolf commented May 16, 2018

@newpavlov
Copy link
Contributor

newpavlov commented May 17, 2018

Take a look at sha3 crate, it does not unroll outermost loop, which significantly reduces binary size and even improves performance a bit.

UPD: also by enabling no_unroll feature on keccak crate you'll get even smaller binary size at the expense of some performance loss.

@eira-fransham
Copy link
Contributor

Thanks for tagging me in this. I meant to do this a while ago (the author of sha3 put in a PR to link to their code so I had a look at it and noticed that they'd rerolled the outer loop) but then just, um, didn't. On it now.

@eira-fransham
Copy link
Contributor

eira-fransham commented May 17, 2018

Another thing that makes explicit loop unrolling a bit of a deal with the devil is that LLVM doesn't seem to autovectorise unrolled loop code, only "real" loops. LLVM's autovectorisation isn't perfect but until we get simd on stable it's the best we have.

@debris
Copy link
Owner

debris commented May 19, 2018

fixed in #30

@debris debris closed this as completed May 19, 2018
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

4 participants