zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit db181b173f6debc2dbb1e68342ff46a4299c19a9 (tree)
parent cfd5b81850d0234a5011c98f840d93bed47210c1
Author: Ali Chraghi <63465728+AliChraghi@users.noreply.github.com>
Date:   Mon, 20 Sep 2021 10:33:18 +0430

Update `hash` & `crypto` benchmarks run comment (#9790)

* sync function arguments name with other same functions
Diffstat:
Mlib/std/crypto/benchmark.zig | 2+-
Mlib/std/crypto/blake3.zig | 8++++----
Mlib/std/hash/benchmark.zig | 2+-
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/std/crypto/benchmark.zig b/lib/std/crypto/benchmark.zig @@ -1,4 +1,4 @@ -// zig run benchmark.zig --release-fast --zig-lib-dir .. +// zig run -O ReleaseFast --zig-lib-dir ../.. benchmark.zig const std = @import("../std.zig"); const builtin = std.builtin; diff --git a/lib/std/crypto/blake3.zig b/lib/std/crypto/blake3.zig @@ -398,10 +398,10 @@ pub const Blake3 = struct { return Blake3.init_internal(context_key_words, DERIVE_KEY_MATERIAL); } - pub fn hash(in: []const u8, out: []u8, options: Options) void { - var hasher = Blake3.init(options); - hasher.update(in); - hasher.final(out); + pub fn hash(b: []const u8, out: []u8, options: Options) void { + var d = Blake3.init(options); + d.update(b); + d.final(out); } fn pushCv(self: *Blake3, cv: [8]u32) void { diff --git a/lib/std/hash/benchmark.zig b/lib/std/hash/benchmark.zig @@ -1,4 +1,4 @@ -// zig run benchmark.zig --release-fast --zig-lib-dir .. +// zig run -O ReleaseFast --zig-lib-dir ../.. benchmark.zig const builtin = std.builtin; const std = @import("std");