| ... | ... | @@ -356,63 +356,63 @@ pub fn main() !void { |
| 356 | 356 | inline for (hashes) |H| { |
| 357 | 357 | if (filter == null or std.mem.indexOf(u8, H.name, filter.?) != null) { |
| 358 | 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 | 363 | inline for (macs) |M| { |
| 364 | 364 | if (filter == null or std.mem.indexOf(u8, M.name, filter.?) != null) { |
| 365 | 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 | 370 | inline for (exchanges) |E| { |
| 371 | 371 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 372 | 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 | 377 | inline for (signatures) |E| { |
| 378 | 378 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 379 | 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 | 384 | inline for (signature_verifications) |E| { |
| 385 | 385 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 386 | 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 | 391 | inline for (batch_signature_verifications) |E| { |
| 392 | 392 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 393 | 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 | 398 | inline for (aeads) |E| { |
| 399 | 399 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 400 | 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 | 405 | inline for (aes) |E| { |
| 406 | 406 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 407 | 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 | 412 | inline for (aes8) |E| { |
| 413 | 413 | if (filter == null or std.mem.indexOf(u8, E.name, filter.?) != null) { |
| 414 | 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 | } |