diff options
| author | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-15 13:14:16 +0600 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-19 12:34:42 -0700 |
| commit | 50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc (patch) | |
| tree | 9e2b95d8e111e905e00511962dfd32c8e5bb3245 /lib/std/hash/benchmark.zig | |
| parent | a6c8ee5231230947c928bbe1c6a39eb6e1bb9c5b (diff) | |
| download | zig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.tar.gz zig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.zip | |
all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'lib/std/hash/benchmark.zig')
| -rw-r--r-- | lib/std/hash/benchmark.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/hash/benchmark.zig b/lib/std/hash/benchmark.zig index cf2f18d22f..62df89f0ae 100644 --- a/lib/std/hash/benchmark.zig +++ b/lib/std/hash/benchmark.zig @@ -127,8 +127,8 @@ pub fn benchmarkHash(comptime H: anytype, bytes: usize, allocator: std.mem.Alloc const end = timer.read(); - const elapsed_s = @intToFloat(f64, end - start) / time.ns_per_s; - const throughput = @floatToInt(u64, @intToFloat(f64, bytes) / elapsed_s); + const elapsed_s = @floatFromInt(f64, end - start) / time.ns_per_s; + const throughput = @intFromFloat(u64, @floatFromInt(f64, bytes) / elapsed_s); return Result{ .hash = final, @@ -166,8 +166,8 @@ pub fn benchmarkHashSmallKeys(comptime H: anytype, key_size: usize, bytes: usize } const end = timer.read(); - const elapsed_s = @intToFloat(f64, end - start) / time.ns_per_s; - const throughput = @floatToInt(u64, @intToFloat(f64, bytes) / elapsed_s); + const elapsed_s = @floatFromInt(f64, end - start) / time.ns_per_s; + const throughput = @intFromFloat(u64, @floatFromInt(f64, bytes) / elapsed_s); std.mem.doNotOptimizeAway(sum); |
