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-friendly Field #2638

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from
Draft

Wasm-friendly Field #2638

wants to merge 15 commits into from

Conversation

mitschabaude
Copy link
Contributor

@mitschabaude mitschabaude commented Oct 1, 2024

WIP, experiments towards #2634

define a "wasm-friendly" Field and test it with Poseidon

TODO: Poseidon results don't agree yet, need unit tests

Performance looks promising though: Close to 4x improvement, to reproduce run

./bench-wasm.sh --bench poseidon_bench

@volhovm volhovm self-assigned this Oct 3, 2024
Base automatically changed from perf/poseidon-wasm to develop October 11, 2024 16:26
@sebastiencs
Copy link

Hi @mitschabaude, this is great work.
I've tried to integrate this implementation in openmina, but mul_assign does not give correct result:
openmina@3f8ed1f
When we multiply a number by 1, the result is zero

@mitschabaude
Copy link
Contributor Author

mitschabaude commented Oct 14, 2024

Hi @mitschabaude, this is great work. I've tried to integrate this implementation in openmina, but mul_assign does not give correct result: openmina@3f8ed1f When we multiply a number by 1, the result is zero

@sebastiencs thanks for testing it, yeah these low-level algorithms are finicky, it will need some debugging to get right. I have an equivalent implementation here though that works perfectly, so I'm sure there's just some small fixable mistake.

I won't be able to finish this PR btw, no longer working at o1Labs -- sorry for leaving this here in an unsatisfying state :)

@volhovm
Copy link
Member

volhovm commented Oct 14, 2024

@sebastiencs I'll look into this PR sometime soon, perhaps tomorrow, and will sync on what's the plan for continuing.

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