Skip to content

Use packed field operations for better performance in hash functions #732

@huitseeker

Description

@huitseeker

Several places in the hash function implementations could benefit from using Plonky3's packed field operations for better SIMD performance.

Locations

  1. Poseidon2 external rounds (miden-crypto/src/hash/algebraic_sponge/poseidon2/mod.rs:148)

  2. AlgebraicSponge trait implementation (miden-crypto/src/hash/algebraic_sponge/mod.rs)

    • Reference: Plonky3-rebased (alternate) #720 (comment)
    • Note: If we implement Permutation for AlgebraicSponge, and with the upcoming new StatefulHasher from lifted FRI, we should be able to delegate to plonky3. The issue is the state ordering.

Benefits

Using packed fields (SIMD operations) can significantly improve performance for hash computations, especially in proof generation where hashing is a major bottleneck.

Related

Part of #724

Metadata

Metadata

Assignees

No one assigned

    Labels

    hashingRelated to hash functionsplonky3Related to Plonky3 migration

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions