| ... | @@ -1,7 +1,7 @@ | ... | @@ -1,7 +1,7 @@ |
| 1 | // zig run benchmark.zig --release-fast --override-lib-dir .. | 1 | // zig run benchmark.zig --release-fast --override-lib-dir .. |
| 2 | | 2 | |
| 3 | const builtin = @import("builtin"); | 3 | const builtin = @import("builtin"); |
| 4 | const std = @import("../std.zig"); | 4 | const std = @import("std"); |
| 5 | const time = std.time; | 5 | const time = std.time; |
| 6 | const Timer = time.Timer; | 6 | const Timer = time.Timer; |
| 7 | const crypto = std.crypto; | 7 | const crypto = std.crypto; |
| ... | @@ -67,7 +67,7 @@ pub fn benchmarkMac(comptime Mac: var, comptime bytes: comptime_int) !u64 { | ... | @@ -67,7 +67,7 @@ pub fn benchmarkMac(comptime Mac: var, comptime bytes: comptime_int) !u64 { |
| 67 | var timer = try Timer.start(); | 67 | var timer = try Timer.start(); |
| 68 | const start = timer.lap(); | 68 | const start = timer.lap(); |
| 69 | while (offset < bytes) : (offset += in.len) { | 69 | while (offset < bytes) : (offset += in.len) { |
| 70 | Mac.create(key[0..], in[0..], key); | 70 | Mac.create(key[0..], in[0..], key[0..]); |
| 71 | } | 71 | } |
| 72 | const end = timer.read(); | 72 | const end = timer.read(); |
| 73 | | 73 | |
| ... | @@ -94,7 +94,7 @@ pub fn benchmarkKeyExchange(comptime DhKeyExchange: var, comptime exchange_count | ... | @@ -94,7 +94,7 @@ pub fn benchmarkKeyExchange(comptime DhKeyExchange: var, comptime exchange_count |
| 94 | { | 94 | { |
| 95 | var i: usize = 0; | 95 | var i: usize = 0; |
| 96 | while (i < exchange_count) : (i += 1) { | 96 | while (i < exchange_count) : (i += 1) { |
| 97 | _ = DhKeyExchange.create(out[0..], out, in); | 97 | _ = DhKeyExchange.create(out[0..], out[0..], in[0..]); |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | const end = timer.read(); | 100 | const end = timer.read(); |