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 |
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
Inductive Expr : Type := | |
| Const : nat -> Expr | |
| Add : Expr -> Expr -> Expr | |
| Mul : Expr -> Expr -> Expr. | |
Fixpoint eval (e : Expr) : nat := | |
match e with | |
| Const n => n | |
| Add e1 e2 => eval e1 + eval e2 | |
| Mul e1 e2 => eval e1 * eval e2 |
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 { | |
// Pin the process to a single core (1) | |
const cpu0001: std.os.linux.cpu_set_t = [1]usize{0b0001} ++ ([_]usize{0} ** (16 - 1)); | |
try std.os.linux.sched_setaffinity(0, &cpu0001); |
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
// https://github.com/crossbeam-rs/crossbeam/blob/abf24e1f31a76ef2590688d0c2bb55f82c7410a9/crossbeam-queue/src/seg_queue.rs | |
const std = @import("std"); | |
const Atomic = std.atomic.Value; | |
const Allocator = std.mem.Allocator; | |
pub fn Channel(T: type) type { | |
return struct { | |
head: Position, | |
tail: Position, | |
allocator: Allocator, |
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
// https://github.com/facebook/folly/blob/1c8bc50e88804e2a7361a57cd9b551dd10f6c5fd/folly/memcpy.S | |
export fn memcpy(maybe_dest: ?[*]u8, maybe_src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 { | |
if (len == 0) { | |
@branchHint(.unlikely); | |
return maybe_dest; | |
} | |
const dest = maybe_dest.?; | |
const src = maybe_src.?; |
NewerOlder