This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const iterations_per_byte = 1000; | |
| const warmup_iterations = 10; | |
| pub fn main() !void { | |
| const allocator = std.heap.smp_allocator; | |
| // Pin the process to a single core (1) | |
| const cpu0001: std.os.linux.cpu_set_t = [1]usize{0b0001} ++ ([_]usize{0} ** (16 - 1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const el: u256 = 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed; | |
| const L = 1 * el; | |
| fn heea(v: u256) struct { u128, u128 } { | |
| std.debug.assert(len(L) == 253); | |
| std.debug.assert(v < L); | |
| std.debug.assert(v > 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From e9b300e1579d456fd307659f86d8ac0373a25fea Mon Sep 17 00:00:00 2001 | |
| From: David Rubin <[email protected]> | |
| Date: Wed, 5 Nov 2025 18:26:33 -0800 | |
| Subject: [PATCH] explicit `PROT_WRITE` in `zero_bss` is redundant | |
| The `PAGE_WRITE` check already protects the `memset`. | |
| The Zig compiler uses `memsz` to reserve virtual address | |
| space that can be used by future updates, including | |
| in non-writable sections such as `.text`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const Edwards25519 = std.crypto.ecc.Edwards25519; | |
| export fn slow(s: *const [32]u8) bool { | |
| Edwards25519.scalar.rejectNonCanonical(s.*) catch return false; | |
| return true; | |
| } | |
| export fn fast(s: *const [32]u8) bool { | |
| // If none of the top 4 bits are set, then the scalar fits into S \in [0, 2^252), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const testing = std.testing; | |
| const iterations_per_byte = 1000; | |
| const warmup_iterations = 10; | |
| pub fn main() !void { | |
| const allocator = std.heap.smp_allocator; | |
| // Pin the process to a single core (1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/libtsan/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc b/lib/libtsan/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc | |
| index 16b2a10d8b..6370e63ab6 100644 | |
| --- a/lib/libtsan/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc | |
| +++ b/lib/libtsan/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc | |
| @@ -641,22 +641,6 @@ static void ioctl_table_fill() { | |
| _(SPKRSETVOL, READ, sizeof(unsigned int)); | |
| #if defined(__x86_64__) | |
| /* Entries from file: dev/nvmm/nvmm_ioctl.h */ | |
| - _(NVMM_IOC_CAPABILITY, WRITE, struct_nvmm_ioc_capability_sz); | |
| - _(NVMM_IOC_MACHINE_CREATE, READWRITE, struct_nvmm_ioc_machine_create_sz); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const iterations_per_byte = 1000; | |
| const warmup_iterations = 10; | |
| pub fn main() !void { | |
| const allocator = std.heap.smp_allocator; | |
| // Pin the process to a single core (1) | |
| const cpu0001: std.os.linux.cpu_set_t = [1]usize{0b0001} ++ ([_]usize{0} ** (16 - 1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const Wrapper = @import("crc32c.zig").Wrapper; | |
| const iterations_per_byte = 1000; | |
| const warmup_iterations = 10; | |
| pub fn main() !void { | |
| const allocator = std.heap.smp_allocator; | |
| // Pin the process to a single core (1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline fn radixSizeHint(w: u64) u64 { | |
| return switch (w) { | |
| 4...7 => (@as(u64, 256) + w - 1) / w, | |
| 8 => (@as(u64, 256) + w - 1) / w + 1, | |
| else => unreachable, | |
| }; | |
| } | |
| inline fn mulByPow2(p: Ed25519, k: u32) Ed25519 { | |
| var s = p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Lean | |
| open Lean | |
| open IO | |
| inductive SExpr | |
| | atom : String → SExpr | |
| | list : List SExpr → SExpr | |
| deriving Repr, Nonempty |
NewerOlder