Skip to content

Investigate simple performance improvement for Apple M1 #9

@mortendahl

Description

@mortendahl

AES seems to be slower than ChaCha on Apple M1:

rng_fill/chacha8/2000000
                        time:   [1.6929 ms 1.6940 ms 1.6951 ms]
Found 9 outliers among 100 measurements (9.00%)
  2 (2.00%) low severe
  1 (1.00%) low mild
  2 (2.00%) high mild
  4 (4.00%) high severe
rng_fill/chacha12/2000000
                        time:   [2.4556 ms 2.4581 ms 2.4606 ms]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
rng_fill/chacha20/2000000
                        time:   [3.9821 ms 3.9857 ms 3.9895 ms]
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
rng_fill/aes/2000000    time:   [8.4624 ms 8.4707 ms 8.4792 ms]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

rng_next_u64/chacha8    time:   [8.0137 us 8.0212 us 8.0285 us]
Found 9 outliers among 100 measurements (9.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  4 (4.00%) high severe
rng_next_u64/chacha12   time:   [11.055 us 11.065 us 11.076 us]
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  2 (2.00%) high severe
rng_next_u64/chacha20   time:   [17.142 us 17.161 us 17.179 us]
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  5 (5.00%) high mild
  1 (1.00%) high severe
rng_next_u64/aes        time:   [36.918 us 36.950 us 36.983 us]
Found 10 outliers among 100 measurements (10.00%)
  5 (5.00%) low mild
  4 (4.00%) high mild
  1 (1.00%) high severe

Maybe this can be fixed by simply enabling a flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions