Skip to content

std.crypto.ml_kem tests are very slow, especially under QEMU #21255

@alexrp

Description

@alexrp

With the test binary already built:

❯ time zig4 build test-std -Dno-lib -fqemu -Dtest-target-filter=riscv64-linux.4.19...6.10.3-none

________________________________________________________
Executed in  375.94 secs    fish           external
   usr time  380.91 secs    0.00 micros  380.91 secs
   sys time    1.27 secs  378.00 micros    1.27 secs

The std.crypto.ml_kem tests account for just about 4 minutes of this if you watch the progress bar. Test happy flow and Test inner PKE are the big offenders.

I had to measure that manually with a stopwatch because, for whatever reason, if you add -Dtest-filter=ml_kem, the tests only take ~30 seconds to run. I have no idea why they're only so slow in a full test binary.

Note that the testing was done on my llvm-19 branch as RISC-V compilation is unusably slow with LLVM 18.

cc @jedisct1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions