OS: Darwin 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov 5 21:28:03 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T8122 arm64
CPU: arm
Timing: Python perf_counter
Levels: 0-9
Runs: 70 Trim worst: 40
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
| /* =========================================================================== | |
| * Symbol buffer write/read macros. | |
| * | |
| * The symbol buffer stores literal and distance/length pairs. The storage | |
| * format differs based on LIT_MEM (separate buffers) vs sym_buf (interleaved), | |
| * and on whether the platform supports fast unaligned 32-bit access | |
| * (OPTIMAL_CMP >= 32), which allows packing a 3-byte symbol into a single | |
| * 32-bit write/read. | |
| * | |
| * SYM_WRITE_LIT and SYM_WRITE_DIST write a symbol and advance sym_next. |
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 re, sys | |
| def parse_results(path): | |
| results = {} | |
| with open(path) as f: | |
| for line in f: | |
| m = re.match(r'\s+(\d+|avg\d?)\s', line) | |
| if not m: | |
| continue | |
| level = m.group(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
| name: Benchmark | |
| on: | |
| issue_comment: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: 'PR number to benchmark (results posted as PR comment)' | |
| required: false | |
| type: number |
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
| // Set up generic C code fallbacks | |
| #ifndef WITH_ALL_FALLBACKS | |
| // Only use necessary generic functions when no suitable simd versions are available. | |
| // These conditions mirror the native_* defines in arch/*_functions.h headers. | |
| # if (defined(X86_SSE2) && defined(__SSE2__)) || (defined(ARCH_X86) && defined(ARCH_64BIT)) | |
| ft.adler32 = &adler32_c; | |
| ft.adler32_copy = &adler32_copy_c; | |
| ft.crc32 = &crc32_braid; | |
| ft.crc32_copy = &crc32_copy_braid; |
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
| /* benchmark_tally.cc -- benchmark sym_buf read/write strategies | |
| * Copyright (C) 2024 zlib-ng contributors | |
| * For conditions of distribution and use, see copyright notice in zlib.h | |
| * | |
| * Compares: | |
| * 1. LIT_MEM (separate d_buf/l_buf arrays) | |
| * 2. sym_buf with zng_memread_4/zng_memwrite_4 (batched) | |
| * 3. sym_buf with byte-by-byte access (original) | |
| */ |
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
| #include <benchmark/benchmark.h> | |
| #include <cstdint> | |
| static inline uint32_t count_matching_bytes_ctzll(uint64_t mask) { | |
| return __builtin_ctzll(mask); | |
| } | |
| static inline uint32_t count_matching_bytes_ctz32(uint64_t mask) { | |
| uint32_t lo = (uint32_t)mask; | |
| if (lo) |
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
| /* benchmark_crc32_tail_copy.cc -- benchmark different copy strategies for CRC32 tail handling | |
| * Copyright (C) 2022 Nathan Moinvaziri | |
| * For conditions of distribution and use, see copyright notice in zlib.h | |
| */ | |
| #include <benchmark/benchmark.h> | |
| #include <cstring> | |
| #include <cstdint> | |
| extern "C" { |
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
| /* benchmark_tailcopy.cc -- benchmark different copy strategies for tail handling | |
| * Copyright (C) 2022 Nathan Moinvaziri | |
| * For conditions of distribution and use, see copyright notice in zlib.h | |
| */ | |
| #include <benchmark/benchmark.h> | |
| #include <cstring> | |
| #include <cstdint> | |
| extern "C" { |
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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "fuzzer_example_small", | |
| "type": "lldb", | |
| "request": "launch", |
NewerOlder