authorgravatar for datamanrb@gmail.comdata-man <datamanrb@gmail.com> 2019-12-07 03:01:24+05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-06 17:14:10-05:00
log80a72c225cf2a08e683936921dfda07f93cef1b8
treef6688dc6f99046251dde5e088eda126dd03c4a26
parent008e42f48351453b2174b361847c5470e6216fa5

Crypto benchmark fixes


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

lib/std/crypto/benchmark.zig+3-3
...@@ -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 ..
22
3const builtin = @import("builtin");3const builtin = @import("builtin");
4const std = @import("../std.zig");4const std = @import("std");
5const time = std.time;5const time = std.time;
6const Timer = time.Timer;6const Timer = time.Timer;
7const crypto = std.crypto;7const 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();
7373
...@@ -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();