| ... | @@ -356,63 +356,63 @@ pub fn main() !void { | ... | @@ -356,63 +356,63 @@ pub fn main() !void { |
| 356 | inline for (hashes) |H| { | 356 | inline for (hashes) |H| { |
| 357 | if (filter == null or std.mem.indexOf(u8, H.name, filter.?) != null) { | 357 | if (filter == null or std.mem.indexOf(u8, H.name, filter.?) != null) { |
| 358 | const throughput = try benchmarkHash(H.ty, mode(128 * MiB)); | 358 | const throughput = try benchmarkHash(H.ty, mode(128 * MiB)); |
| 359 | try stdout.print("{:>17}: {:10} MiB/s\n", .{ H.name, throughput / (1 * MiB) }); | 359 | try stdout.print("{s:>17}: {:10} MiB/s\n", .{ H.name, throughput / (1 * MiB) }); |
| 360 | } | 360 | } |
| 361 | } | 361 | } |
| 362 | | 362 | |
| 363 | inline for (macs) |M| { | 363 | inline for (macs) |M| { |
| 364 | if (filter == null or std.mem.indexOf(u8, M.name, filter.?) != null) { | 364 | if (filter == null or std.mem.indexOf(u8, M.name, filter.?) != null) { |
| 365 | const throughput = try benchmarkMac(M.ty, mode(128 * MiB)); | 365 | const throughput = try benchmarkMac(M.ty, mode(128 * MiB)); |
| 366 | try stdout.print("{:>17}: {:10} MiB/s\n", .{ M.name, throughput / (1 * MiB) }); | 366 | try stdout.print("{s:>17}: {:10} MiB/s\n", .{ M.name, throughput / (1 * MiB) }); |
| 367 | } | 367 | } |
| 368 | } | 368 | } |
| 369 | | 369 | |
| 370 | inline for (exchanges) |E| { | 370 | inline for (exchanges) |E| { |
| 371 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 371 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 372 | const throughput = try benchmarkKeyExchange(E.ty, mode(1000)); | 372 | const throughput = try benchmarkKeyExchange(E.ty, mode(1000)); |
| 373 | try stdout.print("{:>17}: {:10} exchanges/s\n", .{ E.name, throughput }); | 373 | try stdout.print("{s:>17}: {:10} exchanges/s\n", .{ E.name, throughput }); |
| 374 | } | 374 | } |
| 375 | } | 375 | } |
| 376 | | 376 | |
| 377 | inline for (signatures) |E| { | 377 | inline for (signatures) |E| { |
| 378 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 378 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 379 | const throughput = try benchmarkSignature(E.ty, mode(1000)); | 379 | const throughput = try benchmarkSignature(E.ty, mode(1000)); |
| 380 | try stdout.print("{:>17}: {:10} signatures/s\n", .{ E.name, throughput }); | 380 | try stdout.print("{s:>17}: {:10} signatures/s\n", .{ E.name, throughput }); |
| 381 | } | 381 | } |
| 382 | } | 382 | } |
| 383 | | 383 | |
| 384 | inline for (signature_verifications) |E| { | 384 | inline for (signature_verifications) |E| { |
| 385 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 385 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 386 | const throughput = try benchmarkSignatureVerification(E.ty, mode(1000)); | 386 | const throughput = try benchmarkSignatureVerification(E.ty, mode(1000)); |
| 387 | try stdout.print("{:>17}: {:10} verifications/s\n", .{ E.name, throughput }); | 387 | try stdout.print("{s:>17}: {:10} verifications/s\n", .{ E.name, throughput }); |
| 388 | } | 388 | } |
| 389 | } | 389 | } |
| 390 | | 390 | |
| 391 | inline for (batch_signature_verifications) |E| { | 391 | inline for (batch_signature_verifications) |E| { |
| 392 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 392 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 393 | const throughput = try benchmarkBatchSignatureVerification(E.ty, mode(1000)); | 393 | const throughput = try benchmarkBatchSignatureVerification(E.ty, mode(1000)); |
| 394 | try stdout.print("{:>17}: {:10} verifications/s (batch)\n", .{ E.name, throughput }); | 394 | try stdout.print("{s:>17}: {:10} verifications/s (batch)\n", .{ E.name, throughput }); |
| 395 | } | 395 | } |
| 396 | } | 396 | } |
| 397 | | 397 | |
| 398 | inline for (aeads) |E| { | 398 | inline for (aeads) |E| { |
| 399 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 399 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 400 | const throughput = try benchmarkAead(E.ty, mode(128 * MiB)); | 400 | const throughput = try benchmarkAead(E.ty, mode(128 * MiB)); |
| 401 | try stdout.print("{:>17}: {:10} MiB/s\n", .{ E.name, throughput / (1 * MiB) }); | 401 | try stdout.print("{s:>17}: {:10} MiB/s\n", .{ E.name, throughput / (1 * MiB) }); |
| 402 | } | 402 | } |
| 403 | } | 403 | } |
| 404 | | 404 | |
| 405 | inline for (aes) |E| { | 405 | inline for (aes) |E| { |
| 406 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 406 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 407 | const throughput = try benchmarkAes(E.ty, mode(100000000)); | 407 | const throughput = try benchmarkAes(E.ty, mode(100000000)); |
| 408 | try stdout.print("{:>17}: {:10} ops/s\n", .{ E.name, throughput }); | 408 | try stdout.print("{s:>17}: {:10} ops/s\n", .{ E.name, throughput }); |
| 409 | } | 409 | } |
| 410 | } | 410 | } |
| 411 | | 411 | |
| 412 | inline for (aes8) |E| { | 412 | inline for (aes8) |E| { |
| 413 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { | 413 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 414 | const throughput = try benchmarkAes8(E.ty, mode(10000000)); | 414 | const throughput = try benchmarkAes8(E.ty, mode(10000000)); |
| 415 | try stdout.print("{:>17}: {:10} ops/s\n", .{ E.name, throughput }); | 415 | try stdout.print("{s:>17}: {:10} ops/s\n", .{ E.name, throughput }); |
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| 418 | } | 418 | } |