authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2023-05-23 21:47:11+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2023-05-23 19:47:11+00:00
log0000b34a2dcfc1f96d827d38d22894e4b341c402
treee0a9b307ba542abeaeb154f68b238b4cb7b32730
parent057d30bacc4d97f53c2e69585dc8d50186cfc7f5
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

crypto.aes: define optimal_parallel_blocks for more CPUs (#15829)


1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/crypto/aes/aesni.zig+5-5
......@@ -97,12 +97,12 @@ pub const Block = struct {
9797
9898 /// The recommended number of AES encryption/decryption to perform in parallel for the chosen implementation.
9999 pub const optimal_parallel_blocks = switch (builtin.cpu.model) {
100 &cpu.westmere => 6,
101 &cpu.sandybridge, &cpu.ivybridge => 8,
102 &cpu.haswell, &cpu.broadwell => 7,
103 &cpu.cannonlake, &cpu.skylake, &cpu.skylake_avx512 => 4,
100 &cpu.westmere, &cpu.goldmont => 3,
101 &cpu.cannonlake, &cpu.skylake, &cpu.skylake_avx512, &cpu.tremont, &cpu.goldmont_plus, &cpu.cascadelake => 4,
104102 &cpu.icelake_client, &cpu.icelake_server, &cpu.tigerlake, &cpu.rocketlake, &cpu.alderlake => 6,
105 &cpu.znver1, &cpu.znver2, &cpu.znver3 => 8,
103 &cpu.haswell, &cpu.broadwell => 7,
104 &cpu.sandybridge, &cpu.ivybridge => 8,
105 &cpu.znver1, &cpu.znver2, &cpu.znver3, &cpu.znver4 => 8,
106106 else => 8,
107107 };
108108