Skip to content

Blake3 implementation in std is slow #15375

@matklad

Description

@matklad

Zig Version

0.10.1

Steps to Reproduce and Observed Behavior

See https://github.com/matklad/benchmarks/tree/1caed4cfdd2285f2f1946f592fc1d492fd9ed836/blake3 for a reproducible Rust vs Zig benchmark. The representative Result is

Rust
time  = 1.62s
MiB/s = 3859

Zig + ReleaseFast
time  = 6.074s
MiB/S = 1028

(this is pure Rust impl, assembly/C impls is a little bit further faster than that)

Zig results are approximately the same between 0.10.1 and 0.11.0-dev.2680+a1aa55ebe

This is relatively important for us at TigerBeetle.

Expected Behavior

Be as fast as Rust. Ideally, be as fast as asm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.optimizationstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions