diff --git a/VERSIONING.md b/VERSIONING.md index c08de8361..5bb10e79e 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -85,6 +85,14 @@ the hash at the same value on both). Still pre-LTS; the gain was correctness (B3 on ARM) plus scalability overhead reductions, against a one-time region recreation. +The third was **v2026.10.7**, on **macOS arm64 only**: the AArch64 hybrid mutex +is selected there again by default (F7), moving that platform's signature +`0xe0ad2911` → `0x2c8d3688`. Every other platform's build output is +byte-identical to v2026.10.6 (same `db_config.h`, same `.text`, same signature, +verified on Linux x86_64, FreeBSD x86_64 and FreeBSD aarch64), which is why the +v2026.10.6 soak qualifies it there. This is the last region change before the +first LTS; from the LTS tag on, the format is frozen within the line. + ## Consuming code - Human / release identity → `DB_CALVER` (or the leading token of diff --git a/build_android/Android.mk b/build_android/Android.mk index 7cfea3525..39b0f8708 100644 --- a/build_android/Android.mk +++ b/build_android/Android.mk @@ -1,6 +1,6 @@ # DO NOT EDIT: automatically built by dist/s_android. # Makefile for building a drop-in replacement of SQLite using -# libdb 2026.10.6 (October 12, 2026) +# libdb 2026.10.7 (October 15, 2026) ################################################################### LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) diff --git a/build_android/db.h b/build_android/db.h index 10022f121..1affce695 100644 --- a/build_android/db.h +++ b/build_android/db.h @@ -53,9 +53,9 @@ extern "C" { * level. Use this to identify the community fork; use the MAJOR/MINOR/PATCH * triplet for format/ABI compatibility decisions. */ -#define DB_CALVER "2026.10.6" -#define DB_VERSION_STRING "libdb 2026.10.6 (October 12, 2026)" -#define DB_VERSION_FULL_STRING "libdb 2026.10.6 (October 12, 2026)" +#define DB_CALVER "2026.10.7" +#define DB_VERSION_STRING "libdb 2026.10.7 (October 15, 2026)" +#define DB_VERSION_FULL_STRING "libdb 2026.10.7 (October 15, 2026)" /* * !!! diff --git a/build_android/jdbc/jni/Android.mk b/build_android/jdbc/jni/Android.mk index 49b7edd22..426558335 100644 --- a/build_android/jdbc/jni/Android.mk +++ b/build_android/jdbc/jni/Android.mk @@ -1,6 +1,6 @@ # DO NOT EDIT: automatically built by dist/s_android. # Makefile for building Android.JDBC for DBSQL -# libdb 2026.10.6 (October 12, 2026) +# libdb 2026.10.7 (October 15, 2026) # # This Makefile will generate 3 files: # 1. Static libdb_sql library. An internal library and users don't diff --git a/build_windows/db.h b/build_windows/db.h index f76832f57..6b135e31f 100644 --- a/build_windows/db.h +++ b/build_windows/db.h @@ -68,9 +68,9 @@ extern "C" { * level. Use this to identify the community fork; use the MAJOR/MINOR/PATCH * triplet for format/ABI compatibility decisions. */ -#define DB_CALVER "2026.10.6" -#define DB_VERSION_STRING "libdb 2026.10.6 (October 12, 2026)" -#define DB_VERSION_FULL_STRING "libdb 2026.10.6 (October 12, 2026)" +#define DB_CALVER "2026.10.7" +#define DB_VERSION_STRING "libdb 2026.10.7 (October 15, 2026)" +#define DB_VERSION_FULL_STRING "libdb 2026.10.7 (October 15, 2026)" /* * !!! diff --git a/dist/RELEASE b/dist/RELEASE index e292d8411..fcbb07983 100644 --- a/dist/RELEASE +++ b/dist/RELEASE @@ -8,7 +8,7 @@ # Format: YYYY.0M (append .MICRO for a same-month re-release, e.g. 2026.09.1). # Bump YYYY.0M for the month you cut the release; MICRO for follow-ups. # --------------------------------------------------------------------------- -DB_CALVER="2026.10.6" +DB_CALVER="2026.10.7" # --------------------------------------------------------------------------- # FORMAT / ABI COMPATIBILITY LEVEL -- FROZEN at 5.3.37, do NOT bump for a @@ -30,7 +30,7 @@ DB_VERSION_FULL="$DB_VERSION_FAMILY.$DB_VERSION_RELEASE.$DB_VERSION_MAJOR.$DB_VE DB_VERSION_UNIQUE_NAME=`printf "_%d%03d" $DB_VERSION_MAJOR $DB_VERSION_MINOR` -DB_RELEASE_DATE="October 12, 2026" +DB_RELEASE_DATE="October 15, 2026" # User-facing string leads with the CalVer identity; the frozen 5.3.37 is kept # as the parenthesised format/ABI compatibility level so tools that parse it # and existing environments still see a stable compat number. diff --git a/dist/aclocal/mutex.m4 b/dist/aclocal/mutex.m4 index 32a9dbcb9..577b7d729 100644 --- a/dist/aclocal/mutex.m4 +++ b/dist/aclocal/mutex.m4 @@ -387,23 +387,20 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[ #endif ]])], [db_cv_mutex="$db_cv_mutex/x86_64/gcc-assembly"]) -# ARM64/AArch64 gcc/clang: FreeBSD, Linux. A HYBRID probe, so it must +# ARM64/AArch64 gcc/clang: FreeBSD, Linux, macOS. A HYBRID probe, so it must # sit here with the x86 ones, not in the TAS-only list below, which runs only # when no pthreads mutex was found -- i.e. never on these platforms. It used # to be there, and that is why aarch64 built as plain POSIX/pthreads/library: # every acquire a pthread call, and on FreeBSD every multi-process attach # exposed to B3 at t=1 (test/KNOWN-ISSUES.md). # -# Darwin/arm64 (Apple Silicon) is EXCLUDED: the AArch64 TAS primitives were -# validated on FreeBSD/arm64 (Neoverse) and Linux, but on macOS the hybrid -# sleep/wake path does not behave (run_mutex_stress produces no verdict -- the -# binary crashes or hangs before progress). macOS does not have the B3 umtx -# defect the hybrid exists to fix, so it loses nothing by keeping the proven -# POSIX/pthreads path, which is exactly what macOS used before the hybrid -# landed. See test/KNOWN-ISSUES.md (F1 / mutex-stress macOS). +# Darwin/arm64 was excluded for one release (681026b49) on a misdiagnosis: +# run_mutex_stress printed no verdict there, but the runner -- not the mutex -- +# was broken (F7: dyld install-name over -rpath, and no GNU timeout). With the +# runner fixed the hybrid passes on Apple Silicon with its teeth intact, so +# macOS selects it again. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[ -#if (defined(__aarch64__) || defined(_M_ARM64)) && defined(__GNUC__) && \ - !defined(__APPLE__) +#if (defined(__aarch64__) || defined(_M_ARM64)) && defined(__GNUC__) (void)0; /* compile-only probe; nothing is run */ #else FAIL TO COMPILE/LINK diff --git a/dist/configure b/dist/configure index 9c4048bd3..e065cd1fa 100755 --- a/dist/configure +++ b/dist/configure @@ -3596,11 +3596,11 @@ DB_VERSION_MINOR="0" DB_VERSION_PATCH="9" -DB_CALVER="2026.10.6" +DB_CALVER="2026.10.7" -DB_VERSION_STRING='"libdb 2026.10.6 (October 12, 2026)"' +DB_VERSION_STRING='"libdb 2026.10.7 (October 15, 2026)"' -DB_VERSION_FULL_STRING='"libdb 2026.10.6 (October 12, 2026)"' +DB_VERSION_FULL_STRING='"libdb 2026.10.7 (October 15, 2026)"' # Process all options before using them. @@ -24844,20 +24844,18 @@ then : fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -# ARM64/AArch64 gcc/clang: FreeBSD, Linux. A HYBRID probe, so it must +# ARM64/AArch64 gcc/clang: FreeBSD, Linux, macOS. A HYBRID probe, so it must # sit here with the x86 ones, not in the TAS-only list below, which runs only # when no pthreads mutex was found -- i.e. never on these platforms. It used # to be there, and that is why aarch64 built as plain POSIX/pthreads/library: # every acquire a pthread call, and on FreeBSD every multi-process attach # exposed to B3 at t=1 (test/KNOWN-ISSUES.md). # -# Darwin/arm64 (Apple Silicon) is EXCLUDED: the AArch64 TAS primitives were -# validated on FreeBSD/arm64 (Neoverse) and Linux, but on macOS the hybrid -# sleep/wake path does not behave (run_mutex_stress produces no verdict -- the -# binary crashes or hangs before progress). macOS does not have the B3 umtx -# defect the hybrid exists to fix, so it loses nothing by keeping the proven -# POSIX/pthreads path, which is exactly what macOS used before the hybrid -# landed. See test/KNOWN-ISSUES.md (F1 / mutex-stress macOS). +# Darwin/arm64 was excluded for one release (681026b49) on a misdiagnosis: +# run_mutex_stress printed no verdict there, but the runner -- not the mutex -- +# was broken (F7: dyld install-name over -rpath, and no GNU timeout). With the +# runner fixed the hybrid passes on Apple Silicon with its teeth intact, so +# macOS selects it again. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -24865,8 +24863,7 @@ int main (void) { -#if (defined(__aarch64__) || defined(_M_ARM64)) && defined(__GNUC__) && \ - !defined(__APPLE__) +#if (defined(__aarch64__) || defined(_M_ARM64)) && defined(__GNUC__) (void)0; /* compile-only probe; nothing is run */ #else FAIL TO COMPILE/LINK diff --git a/dist/meson.build b/dist/meson.build index 64f3d7d43..39a30c9a6 100644 --- a/dist/meson.build +++ b/dist/meson.build @@ -218,11 +218,9 @@ endif # here is the one thing that could actually be missing: outline atomics need # __aarch64_swp1_acq from the compiler runtime. # -# Darwin/arm64 (Apple Silicon) is excluded, mirroring mutex.m4: the hybrid -# sleep/wake path does not behave on macOS (run_mutex_stress produces no -# verdict), and macOS lacks the B3 umtx defect the hybrid fixes, so it keeps -# the proven POSIX/pthreads path it used before the hybrid landed. -if host_machine.cpu_family() == 'aarch64' and host_machine.system() != 'darwin' and cc.links(''' +# Darwin/arm64 selects it too, mirroring mutex.m4 (the one-release exclusion +# in 681026b49 rested on a test-runner bug, F7). +if host_machine.cpu_family() == 'aarch64' and cc.links(''' int main(void) { volatile unsigned char tsl = 0; int r = __atomic_exchange_n(&tsl, 1, __ATOMIC_ACQUIRE); @@ -333,8 +331,8 @@ cdata.set('SIZEOF_CHAR_P', cc.sizeof('void *')) # Package strings. cdata.set_quoted('PACKAGE_NAME', 'Berkeley DB') cdata.set_quoted('PACKAGE_TARNAME', 'db') -cdata.set_quoted('PACKAGE_VERSION', '2026.10.6') -cdata.set_quoted('PACKAGE_STRING', 'libdb 2026.10.6') +cdata.set_quoted('PACKAGE_VERSION', '2026.10.7') +cdata.set_quoted('PACKAGE_STRING', 'libdb 2026.10.7') cdata.set_quoted('PACKAGE_BUGREPORT', '') cdata.set_quoted('PACKAGE_URL', '') cdata.set_quoted('LT_OBJDIR', '.libs/') diff --git a/dist/meson/db_subs.json b/dist/meson/db_subs.json index d9702f31a..39f82b179 100644 --- a/dist/meson/db_subs.json +++ b/dist/meson/db_subs.json @@ -4,9 +4,9 @@ "DB_VERSION_MAJOR": "2026", "DB_VERSION_MINOR": "0", "DB_VERSION_PATCH": "9", - "DB_CALVER": "2026.10.6", - "DB_VERSION_STRING": "\"libdb 2026.10.6 (October 12, 2026)\"", - "DB_VERSION_FULL_STRING": "\"libdb 2026.10.6 (October 12, 2026)\"", + "DB_CALVER": "2026.10.7", + "DB_VERSION_STRING": "\"libdb 2026.10.7 (October 15, 2026)\"", + "DB_VERSION_FULL_STRING": "\"libdb 2026.10.7 (October 15, 2026)\"", "DB_VERSION_UNIQUE_NAME": "", "DB_CONST": "", "DB_PROTO1": "", diff --git a/docs_src/guides/upgrading/upgrade_2026_10_7.md b/docs_src/guides/upgrading/upgrade_2026_10_7.md new file mode 100644 index 000000000..57d83b45a --- /dev/null +++ b/docs_src/guides/upgrading/upgrade_2026_10_7.md @@ -0,0 +1,45 @@ +--- +title: "Upgrading to libdb 2026.10.7" +api-name: "Upgrading to libdb 2026.10.7" +--- +## Upgrading to libdb 2026.10.7 + +**On macOS on Apple Silicon (arm64), libdb 2026.10.7 changes the shared-memory environment region format.** On every other platform, nothing changes: a 2026.10.7 build produces the same region format as 2026.10.6, and environments created by either release attach to the other. + +Databases and log files do not change on any platform. + +### What changed and why + +Since 2026.10.6, FreeBSD and Linux on 64-bit ARM have used a hybrid mutex: a short test-and-set spin, then a sleep on a pthread primitive. Release 2026.10.6 excluded macOS from it, because a stress test produced no result there. The cause turned out to be the test runner, not the mutex. On macOS the runner could not start its test program, because the library's install name took precedence over `-rpath` and stock macOS has no `timeout` command. + +With the runner fixed, the hybrid was compared with the pthread mutex on Apple Silicon. Both passed the same correctness tests (mutex stress, the lock-conflict matrix, and the regression runners). The hybrid was as fast or faster in every measured case, never slower, and lock-manager throughput rose by up to 2× at two threads. libdb 2026.10.7 therefore selects the hybrid on macOS/arm64 by default, as it already did on the other arm64 platforms. See `test/bench/F7-MACOS-HYBRID-2026-10.md`. + +The hybrid mutex is a different shared structure from the pthread mutex, so the macOS/arm64 environment build signature changes. + +### Build signatures + +| Platform | 2026.10.6 | 2026.10.7 | +| --- | --- | --- | +| macOS arm64 | `0xe0ad2911` | `0x2c8d3688` | +| Linux / FreeBSD x86_64 (LP64) | unchanged | unchanged | +| FreeBSD / Linux aarch64 | unchanged | unchanged | +| Windows | unchanged | unchanged | + +### What you will see on macOS arm64 if you do not follow the procedure + +A 2026.10.7 process that opens an environment created by 2026.10.6, or the other way round, fails cleanly: + + BDB1539 Build signature doesn't match environment + DB_ENV->open: DB_VERSION_MISMATCH + +Nothing is read or written in that case. This includes a 2026.10.7 process and a 2026.10.6 utility such as `db_stat` or `db_recover`. + +To keep the 2026.10.6 region format on macOS instead, configure with `--with-mutex=POSIX/pthreads/library`. + +### Procedure (macOS arm64 only) + +1. Shut down every process using the environment, including utilities. +2. Run recovery with the **old** release, or confirm the environment was shut down cleanly. +3. Remove the environment region files (`DB_ENV->remove`, or delete `__db.0*`). Do not remove databases or logs. +4. Install libdb 2026.10.7. +5. Reopen the environment. libdb recreates the region files in the new format. diff --git a/meson.build b/meson.build index 7584c3c0c..67b2b25c8 100644 --- a/meson.build +++ b/meson.build @@ -12,7 +12,7 @@ # meson test -C build --suite tiers # isolation + lock-matrix tiers project('libdb', 'c', - version: '2026.10.6', + version: '2026.10.7', # Sleepycat, matching LICENSE (byte-identical to Oracle's) and README.md. # This field previously named a copyleft licence that this fork # deliberately excludes: README.md explains that Berkeley DB releases from diff --git a/test/KNOWN-ISSUES.md b/test/KNOWN-ISSUES.md index 9e96538d7..c4d12e232 100644 --- a/test/KNOWN-ISSUES.md +++ b/test/KNOWN-ISSUES.md @@ -152,7 +152,7 @@ Full analysis: `rfc/0011-test-coverage-gaps.md`. | id | issue | status | |----|-------|--------| | **F1** | **Apple clang 15.0.0 (clang-1500.3.9.4) crashes compiling `src/env/env_register.c`** on the `macos-14` runner: `clang: error: unable to execute command: Abort trap: 6`, `clang frontend command failed due to signal`, with a "PLEASE submit a bug report" note and preprocessed source dumped to the runner's temp dir. **Not reproducible** — an unmodified rerun of the identical commit passed, and the job had succeeded on master's previous 5 runs. Most likely a resource/OOM abort on the hosted runner rather than a deterministic frontend bug. Not filed upstream: Apple's clang tracker needs the preprocessed source and run script the crash dumps, and those live on an ephemeral runner that is destroyed with the job, so there is nothing reproducible to submit. **If it recurs, capture the artifacts first** — add a step that uploads `/var/folders/**/*.c` and the `*.sh` run script from the crash note as a build artifact, then file with those attached. A crash report without the reproducer would be closed unactionable. | monitoring | -| **F7** | **`run_mutex_stress` produced NO VERDICT on every macOS job because the runner could not start its driver there, not because of a mutex defect.** Two runner bugs, each sufficient on its own. (1) It linked the shared library first, and on macOS `libdb-2026.0.dylib` carries the install name `/usr/local/BerkeleyDB.2026.0/lib/libdb-2026.0.dylib`, which takes precedence over `-rpath`, so dyld aborted the uninstalled binary before `main()` (rc=134). (2) It called bare `timeout`, which stock macOS does not have (rc=127, the gap 39b6fc6f2 fixed in the sibling runners). `2>&1 \| grep '^VERDICT'` discarded both messages, which is why it looked like a crash inside the driver and was independent of the mutex backend. Reproduced on an M3 Pro (macOS 27, Apple clang 21) with both the hybrid build (4a4cff4d9) and the pthreads build (v2026.10.6). **Fixed** by linking the static library first and resolving `timeout`/`gtimeout`/none as `run_recd_handlers.sh` does; the runner also prints the driver's output when there is no verdict, and the Darwin SKIP is gone. With the driver actually running, the AArch64 hybrid passes on Apple Silicon (20/20) and the teeth hold there: non-atomic `MUTEX_SET` and RELAXED set/unset fail counter mode 2/2, and `MUTEX_MEMBAR` reduced to a compiler barrier hangs handoff mode 2/2. The Darwin exclusion of the hybrid (681026b49) rested on the misdiagnosis and is still in place at this commit. | **fixed (runner)** | +| **F7** | **`run_mutex_stress` produced NO VERDICT on every macOS job because the runner could not start its driver there, not because of a mutex defect.** Two runner bugs, each sufficient on its own. (1) It linked the shared library first, and on macOS `libdb-2026.0.dylib` carries the install name `/usr/local/BerkeleyDB.2026.0/lib/libdb-2026.0.dylib`, which takes precedence over `-rpath`, so dyld aborted the uninstalled binary before `main()` (rc=134). (2) It called bare `timeout`, which stock macOS does not have (rc=127, the gap 39b6fc6f2 fixed in the sibling runners). `2>&1 \| grep '^VERDICT'` discarded both messages, which is why it looked like a crash inside the driver and was independent of the mutex backend. Reproduced on an M3 Pro (macOS 27, Apple clang 21) with both the hybrid build (4a4cff4d9) and the pthreads build (v2026.10.6). **Fixed** by linking the static library first and resolving `timeout`/`gtimeout`/none as `run_recd_handlers.sh` does; the runner also prints the driver's output when there is no verdict, and the Darwin SKIP is gone. With the driver actually running, the AArch64 hybrid passes on Apple Silicon (20/20) and the teeth hold there: non-atomic `MUTEX_SET` and RELAXED set/unset fail counter mode 2/2, and `MUTEX_MEMBAR` reduced to a compiler barrier hangs handoff mode 2/2. The Darwin exclusion of the hybrid (681026b49) rested on the misdiagnosis; **2026.10.7 selects the hybrid on macOS/arm64 again by default**, after an A/B on Apple Silicon showed identical correctness on both arms (mutex_stress 4/4, lockmatrix 55/55, db-tier 33/0) and the hybrid faster or neutral in every cell, never slower (lock manager up to 2.0× at 2 threads) — `test/bench/F7-MACOS-HYBRID-2026-10.md`. That moves the macOS/arm64 region signature `0xe0ad2911` → `0x2c8d3688`. | **fixed** | ## Why this file exists diff --git a/test/bench/F7-MACOS-HYBRID-2026-10.md b/test/bench/F7-MACOS-HYBRID-2026-10.md new file mode 100644 index 000000000..8431b5e35 --- /dev/null +++ b/test/bench/F7-MACOS-HYBRID-2026-10.md @@ -0,0 +1,108 @@ +# F7 — the AArch64 hybrid mutex on macOS (Apple Silicon) + +**Decision:** macOS/arm64 selects the hybrid (TAS spin + pthread block) mutex +by default again, as FreeBSD/arm64 and Linux/arm64 do. It was excluded for one +release (`681026b49`) on a misdiagnosis. + +## What F7 actually was + +`run_mutex_stress` printed no verdict on every macOS CI job. That was read as a +mutex defect, so `681026b49` stopped selecting the hybrid on Darwin and +`f3bef0ab5` then skipped the test. PR #211 found the real cause: the **runner** +never started its driver on macOS. The dylib's baked-in install name took +precedence over `-rpath`, so dyld aborted the binary before `main()` (rc=134). +Stock macOS also has no GNU `timeout` (rc=127). `2>&1 | grep` threw away both +messages. Neither mutex was at fault. + +## Evidence + +Run [38646734711](https://github.com/berkeleydb/libdb/actions/runs/38646734711) +(`.github/workflows/f7-macos-ab.yml`, dispatch-only) built master twice on each +of `macos-14` and `macos-latest` (both "Apple M1 (Virtual)"): the pthreads mutex +Darwin selected, and the hybrid forced with `--with-mutex`. The workflow asserts +the hybrid arm really defines `HAVE_MUTEX_HYBRID` + `HAVE_MUTEX_ARM64_GCC_ASSEMBLY` +and the pthreads arm does not. + +### Correctness: identical on both arms, both runners + +| | pthreads | hybrid | +|---|---|---| +| `run_mutex_stress` (counter ×2, handoff ×2) | 4/4 PASS | 4/4 PASS | +| lockmatrix (modes, conflicts, list: 55 checks) | 3/3, 0 failed | 3/3, 0 failed | +| `test/db/run_all.sh` | 33 PASS / 0 FAIL | 33 PASS / 0 FAIL | + +The stress test's teeth hold on Apple Silicon (PR #211): with a sabotaged +`src/dbinc/mutex_int.h`, a non-atomic `MUTEX_SET` and RELAXED set/unset each fail +counter mode 2/2, and `MUTEX_MEMBAR` reduced to a compiler barrier hangs handoff +mode 2/2. + +### Performance: hybrid / pthreads, median of 7 alternated reps + +Ratio of medians with a bootstrap 95% CI. "faster" means the CI's lower bound is +above 1.0. Hosted runners are small VMs (3 vCPU), so a cell with cv ≥ 10% is +marked noisy and should be read as direction only. + +``` +macos-14 + bench thr pthread hybrid ratio 95% CI cv_p cv_h verdict + lock_distinct 1 10798623 11677948 1.08 [1.01,1.21] 4.3 7.7 faster + lock_distinct 2 6871813 13838829 2.01 [1.29,3.04] 29.6 13.2 faster (noisy) + lock_distinct 4 9616393 16667177 1.73 [1.17,1.89] 16.7 14.1 faster (noisy) + lock_distinct 8 11175841 16820999 1.51 [1.01,2.05] 15.7 20.3 faster (noisy) + lock_shared 1 10815503 11843273 1.10 [1.01,1.16] 4.3 7.2 faster + lock_shared 2 6786825 11323694 1.67 [1.25,2.88] 29.8 11.3 faster (noisy) + lock_shared 4 8422738 12078849 1.43 [1.25,2.31] 22.8 14.8 faster (noisy) + lock_shared 8 9374983 10956987 1.17 [0.94,1.76] 14.5 25.7 ~ (noisy) + scale_rhot 1 2108572 2201129 1.04 [0.96,1.11] 4.7 6.7 ~ + scale_rhot 2 1461011 1895637 1.30 [0.99,1.42] 13.8 13.1 ~ (noisy) + scale_rhot 4 1627468 2349861 1.44 [1.06,3.71] 43.4 13.6 faster (noisy) + scale_rhot 8 1374087 2538714 1.85 [1.04,2.05] 27.8 15.9 faster (noisy) + scale_wrand 1 1965 2237 1.14 [0.87,1.29] 14.2 13.2 ~ (noisy) + scale_wrand 2 2866 3399 1.19 [0.98,1.32] 10.7 10.3 ~ (noisy) + scale_wrand 4 4558 4580 1.00 [0.66,1.34] 16.7 20.7 ~ (noisy) + scale_wrand 8 7727 9051 1.17 [0.88,1.40] 12.0 17.5 ~ (noisy) + +macos-latest + bench thr pthread hybrid ratio 95% CI cv_p cv_h verdict + lock_distinct 1 10771051 11680979 1.08 [0.98,1.12] 8.8 6.8 ~ + lock_distinct 2 8412044 12555868 1.49 [1.44,1.77] 6.9 8.6 faster + lock_distinct 4 10385990 13312235 1.28 [0.97,1.45] 12.2 13.4 ~ (noisy) + lock_distinct 8 10838935 15369611 1.42 [1.26,1.74] 11.6 11.3 faster (noisy) + lock_shared 1 10491468 11657149 1.11 [1.01,1.18] 7.9 4.6 faster + lock_shared 2 7802181 11247456 1.44 [1.25,1.63] 7.7 7.0 faster + lock_shared 4 9988546 11132727 1.11 [0.91,1.30] 14.0 15.7 ~ (noisy) + lock_shared 8 10663050 11121170 1.04 [0.88,1.42] 17.3 19.9 ~ (noisy) + scale_rhot 1 2136089 2282619 1.07 [0.96,1.10] 9.0 4.2 ~ + scale_rhot 2 1879061 1961766 1.04 [1.00,1.20] 13.8 3.3 ~ (noisy) + scale_rhot 4 1458100 2183452 1.50 [1.02,1.93] 17.2 21.5 faster (noisy) + scale_rhot 8 1774082 2039497 1.15 [0.80,1.51] 11.8 22.4 ~ (noisy) + scale_wrand 1 2381 2264 0.95 [0.82,1.18] 10.5 12.1 ~ (noisy) + scale_wrand 2 3081 3634 1.18 [0.91,1.36] 16.7 8.0 ~ (noisy) + scale_wrand 4 5348 5701 1.07 [0.96,1.42] 13.7 7.2 ~ (noisy) + scale_wrand 8 9000 10017 1.11 [0.98,1.27] 14.8 6.9 ~ (noisy) +``` + +- **Lock manager** (`lock_bench`, no access methods, no buffer pool): faster or + neutral in every cell. At 2 threads the hybrid ran 1.44–2.0× the pthreads arm + on both runners. No cell is significantly slower. +- **Hot-key reads** (`scale_bench rhot`): faster at 4 threads on both runners + (1.44×, 1.50×). Other cells are neutral. +- **Writes** (`scale_bench wrand`): neutral everywhere. Expected, since this path + is bound by log flush, not mutex hand-off. + +The harness's own noise floor, measured by pointing both arms at the **same** +library on Linux, is 0.94–1.08×. + +### What this does not measure + +It was not run on Apple Silicon metal or at more than 8 threads: AWS mac2 hosts +need a dedicated-host quota, and the request for it is still pending. Re-measure +on metal when the quota arrives. + +## Region signature + +The hybrid makes `DB_MUTEX` larger, so the macOS/arm64 environment signature +changes: `0xe0ad2911` (pthreads) → `0x2c8d3688` (hybrid), measured on both +runners. No other platform's build changes. A macOS/arm64 process from +2026.10.6 and one from 2026.10.7 cannot share an environment, and the attempt +fails cleanly with `DB_VERSION_MISMATCH`. diff --git a/test/bench/F7-MACOS-HYBRID-2026-10/ab-macos-14.tsv b/test/bench/F7-MACOS-HYBRID-2026-10/ab-macos-14.tsv new file mode 100644 index 000000000..831526c7f --- /dev/null +++ b/test/bench/F7-MACOS-HYBRID-2026-10/ab-macos-14.tsv @@ -0,0 +1,225 @@ +rep arm bench threads ops_per_sec +1 pthread lock_distinct 1 10087946 +1 pthread lock_shared 1 9959525 +1 pthread scale_rhot 1 2018514 +1 pthread scale_wrand 1 1594 +1 pthread lock_distinct 2 6871813 +1 pthread lock_shared 2 6786825 +1 pthread scale_rhot 2 1896429 +1 pthread scale_wrand 2 2694 +1 pthread lock_distinct 4 11890459 +1 pthread lock_shared 4 11075487 +1 pthread scale_rhot 4 1627468 +1 pthread scale_wrand 4 4558 +1 pthread lock_distinct 8 11175841 +1 pthread lock_shared 8 9507474 +1 pthread scale_rhot 8 2160449 +1 pthread scale_wrand 8 7940 +1 hybrid lock_distinct 1 11677948 +1 hybrid lock_shared 1 11843273 +1 hybrid scale_rhot 1 2201129 +1 hybrid scale_wrand 1 2256 +1 hybrid lock_distinct 2 14146447 +1 hybrid lock_shared 2 10081970 +1 hybrid scale_rhot 2 1325108 +1 hybrid scale_wrand 2 2757 +1 hybrid lock_distinct 4 13585962 +1 hybrid lock_shared 4 11153520 +1 hybrid scale_rhot 4 1720031 +1 hybrid scale_wrand 4 4485 +1 hybrid lock_distinct 8 16820999 +1 hybrid lock_shared 8 12539721 +1 hybrid scale_rhot 8 2584002 +1 hybrid scale_wrand 8 6397 +2 hybrid lock_distinct 1 9743819 +2 hybrid lock_shared 1 9850324 +2 hybrid scale_rhot 1 1841419 +2 hybrid scale_wrand 1 2086 +2 hybrid lock_distinct 2 13619074 +2 hybrid lock_shared 2 11594103 +2 hybrid scale_rhot 2 1895637 +2 hybrid scale_wrand 2 3464 +2 hybrid lock_distinct 4 16856621 +2 hybrid lock_shared 4 14075771 +2 hybrid scale_rhot 4 2431725 +2 hybrid scale_wrand 4 3558 +2 hybrid lock_distinct 8 9805878 +2 hybrid lock_shared 8 6671424 +2 hybrid scale_rhot 8 1585893 +2 hybrid scale_wrand 8 7698 +2 pthread lock_distinct 1 10798623 +2 pthread lock_shared 1 11030667 +2 pthread scale_rhot 1 2114707 +2 pthread scale_wrand 1 1965 +2 pthread lock_distinct 2 9743525 +2 pthread lock_shared 2 8698846 +2 pthread scale_rhot 2 1359649 +2 pthread scale_wrand 2 3265 +2 pthread lock_distinct 4 11616805 +2 pthread lock_shared 4 8422738 +2 pthread scale_rhot 4 1636170 +2 pthread scale_wrand 4 5425 +2 pthread lock_distinct 8 11431472 +2 pthread lock_shared 8 9940364 +2 pthread scale_rhot 8 2201203 +2 pthread scale_wrand 8 8758 +3 pthread lock_distinct 1 11207682 +3 pthread lock_shared 1 11291506 +3 pthread scale_rhot 1 2160300 +3 pthread scale_wrand 1 2299 +3 pthread lock_distinct 2 6633895 +3 pthread lock_shared 2 5281840 +3 pthread scale_rhot 2 1603410 +3 pthread scale_wrand 2 2884 +3 pthread lock_distinct 4 8917166 +3 pthread lock_shared 4 8890989 +3 pthread scale_rhot 4 1998473 +3 pthread scale_wrand 4 6338 +3 pthread lock_distinct 8 12934696 +3 pthread lock_shared 8 8498923 +3 pthread scale_rhot 8 1364842 +3 pthread scale_wrand 8 10109 +3 hybrid lock_distinct 1 12445517 +3 hybrid lock_shared 1 12054154 +3 hybrid scale_rhot 1 2254227 +3 hybrid scale_wrand 1 2237 +3 hybrid lock_distinct 2 13838829 +3 hybrid lock_shared 2 11472671 +3 hybrid scale_rhot 2 2068922 +3 hybrid scale_wrand 2 3399 +3 hybrid lock_distinct 4 16667177 +3 hybrid lock_shared 4 13278794 +3 hybrid scale_rhot 4 1967354 +3 hybrid scale_wrand 4 5612 +3 hybrid lock_distinct 8 17426934 +3 hybrid lock_shared 8 14708142 +3 hybrid scale_rhot 8 2612794 +3 hybrid scale_wrand 8 11291 +4 hybrid lock_distinct 1 12218991 +4 hybrid lock_shared 1 12320332 +4 hybrid scale_rhot 1 2239176 +4 hybrid scale_wrand 1 2443 +4 hybrid lock_distinct 2 15380318 +4 hybrid lock_shared 2 11783039 +4 hybrid scale_rhot 2 1915486 +4 hybrid scale_wrand 2 3787 +4 hybrid lock_distinct 4 17204599 +4 hybrid lock_shared 4 12078849 +4 hybrid scale_rhot 4 2349861 +4 hybrid scale_wrand 4 5838 +4 hybrid lock_distinct 8 17393413 +4 hybrid lock_shared 8 10956987 +4 hybrid scale_rhot 8 2042842 +4 hybrid scale_wrand 8 7918 +4 pthread lock_distinct 1 9986404 +4 pthread lock_shared 1 10815503 +4 pthread scale_rhot 1 2108572 +4 pthread scale_wrand 1 1755 +4 pthread lock_distinct 2 4229436 +4 pthread lock_shared 2 3979213 +4 pthread scale_rhot 2 1333576 +4 pthread scale_wrand 2 2591 +4 pthread lock_distinct 4 9090212 +4 pthread lock_shared 4 5760748 +4 pthread scale_rhot 4 625100 +4 pthread scale_wrand 4 4216 +4 pthread lock_distinct 8 8299714 +4 pthread lock_shared 8 7111402 +4 pthread scale_rhot 8 981989 +4 pthread scale_wrand 8 7058 +5 pthread lock_distinct 1 11095150 +5 pthread lock_shared 1 10758746 +5 pthread scale_rhot 1 1935222 +5 pthread scale_wrand 1 1830 +5 pthread lock_distinct 2 4647979 +5 pthread lock_shared 2 3720149 +5 pthread scale_rhot 2 1403907 +5 pthread scale_wrand 2 2561 +5 pthread lock_distinct 4 7745938 +5 pthread lock_shared 4 5280391 +5 pthread scale_rhot 4 655891 +5 pthread scale_wrand 4 3806 +5 pthread lock_distinct 8 8498122 +5 pthread lock_shared 8 7008226 +5 pthread scale_rhot 8 1962491 +5 pthread scale_wrand 8 7467 +5 hybrid lock_distinct 1 11189736 +5 hybrid lock_shared 1 11087012 +5 hybrid scale_rhot 1 2030929 +5 hybrid scale_wrand 1 1610 +5 hybrid lock_distinct 2 11440565 +5 hybrid lock_shared 2 10484677 +5 hybrid scale_rhot 2 1878969 +5 hybrid scale_wrand 2 3418 +5 hybrid lock_distinct 4 17179236 +5 hybrid lock_shared 4 13292412 +5 hybrid scale_rhot 4 2686146 +5 hybrid scale_wrand 4 3488 +5 hybrid lock_distinct 8 11543436 +5 hybrid lock_shared 8 8951533 +5 hybrid scale_rhot 8 2538714 +5 hybrid scale_wrand 8 9051 +6 hybrid lock_distinct 1 12547515 +6 hybrid lock_shared 1 12436977 +6 hybrid scale_rhot 1 2257089 +6 hybrid scale_wrand 1 2268 +6 hybrid lock_distinct 2 14118457 +6 hybrid lock_shared 2 11323694 +6 hybrid scale_rhot 2 1998282 +6 hybrid scale_wrand 2 3364 +6 hybrid lock_distinct 4 14927742 +6 hybrid lock_shared 4 11430400 +6 hybrid scale_rhot 4 2448602 +6 hybrid scale_wrand 4 6147 +6 hybrid lock_distinct 8 17948596 +6 hybrid lock_shared 8 15470044 +6 hybrid scale_rhot 8 2735539 +6 hybrid scale_wrand 8 10438 +6 pthread lock_distinct 1 11118317 +6 pthread lock_shared 1 11395230 +6 pthread scale_rhot 1 2254974 +6 pthread scale_wrand 1 2461 +6 pthread lock_distinct 2 9959667 +6 pthread lock_shared 2 8386533 +6 pthread scale_rhot 2 1845070 +6 pthread scale_wrand 2 3433 +6 pthread lock_distinct 4 12691264 +6 pthread lock_shared 4 8929973 +6 pthread scale_rhot 4 2057200 +6 pthread scale_wrand 4 5361 +6 pthread lock_distinct 8 11669449 +6 pthread lock_shared 8 9374983 +6 pthread scale_rhot 8 1257439 +6 pthread scale_wrand 8 7727 +7 pthread lock_distinct 1 10547485 +7 pthread lock_shared 1 10421951 +7 pthread scale_rhot 1 2024041 +7 pthread scale_wrand 1 2032 +7 pthread lock_distinct 2 8860709 +7 pthread lock_shared 2 7573875 +7 pthread scale_rhot 2 1461011 +7 pthread scale_wrand 2 2866 +7 pthread lock_distinct 4 9616393 +7 pthread lock_shared 4 8105830 +7 pthread scale_rhot 4 806685 +7 pthread scale_wrand 4 4347 +7 pthread lock_distinct 8 9266342 +7 pthread lock_shared 8 10627576 +7 pthread scale_rhot 8 1374087 +7 pthread scale_wrand 8 7396 +7 hybrid lock_distinct 1 11490498 +7 hybrid lock_shared 1 11516538 +7 hybrid scale_rhot 1 2108145 +7 hybrid scale_wrand 1 1769 +7 hybrid lock_distinct 2 9888572 +7 hybrid lock_shared 2 8080378 +7 hybrid scale_rhot 2 1618229 +7 hybrid scale_wrand 2 2837 +7 hybrid lock_distinct 4 11017758 +7 hybrid lock_shared 4 8339871 +7 hybrid scale_rhot 4 2113059 +7 hybrid scale_wrand 4 4580 +7 hybrid lock_distinct 8 13607337 +7 hybrid lock_shared 8 9999939 +7 hybrid scale_rhot 8 2428424 +7 hybrid scale_wrand 8 9302 diff --git a/test/bench/F7-MACOS-HYBRID-2026-10/ab-macos-latest.tsv b/test/bench/F7-MACOS-HYBRID-2026-10/ab-macos-latest.tsv new file mode 100644 index 000000000..809f848a4 --- /dev/null +++ b/test/bench/F7-MACOS-HYBRID-2026-10/ab-macos-latest.tsv @@ -0,0 +1,225 @@ +rep arm bench threads ops_per_sec +1 pthread lock_distinct 1 10771051 +1 pthread lock_shared 1 10491468 +1 pthread scale_rhot 1 2136089 +1 pthread scale_wrand 1 2079 +1 pthread lock_distinct 2 7208821 +1 pthread lock_shared 2 6348879 +1 pthread scale_rhot 2 1703811 +1 pthread scale_wrand 2 2376 +1 pthread lock_distinct 4 8781531 +1 pthread lock_shared 4 6848138 +1 pthread scale_rhot 4 999840 +1 pthread scale_wrand 4 4086 +1 pthread lock_distinct 8 8519364 +1 pthread lock_shared 8 8372605 +1 pthread scale_rhot 8 1442371 +1 pthread scale_wrand 8 8784 +1 hybrid lock_distinct 1 9792844 +1 hybrid lock_shared 1 10688469 +1 hybrid scale_rhot 1 2084291 +1 hybrid scale_wrand 1 2143 +1 hybrid lock_distinct 2 12206581 +1 hybrid lock_shared 2 9787205 +1 hybrid scale_rhot 2 1961766 +1 hybrid scale_wrand 2 3688 +1 hybrid lock_distinct 4 11961739 +1 hybrid lock_shared 4 9504203 +1 hybrid scale_rhot 4 1611848 +1 hybrid scale_wrand 4 5517 +1 hybrid lock_distinct 8 13943365 +1 hybrid lock_shared 8 10042090 +1 hybrid scale_rhot 8 1718981 +1 hybrid scale_wrand 8 9233 +2 hybrid lock_distinct 1 11707292 +2 hybrid lock_shared 1 11056086 +2 hybrid scale_rhot 1 2242059 +2 hybrid scale_wrand 1 1709 +2 hybrid lock_distinct 2 12157019 +2 hybrid lock_shared 2 11125479 +2 hybrid scale_rhot 2 1788869 +2 hybrid scale_wrand 2 2869 +2 hybrid lock_distinct 4 10927739 +2 hybrid lock_shared 4 7223903 +2 hybrid scale_rhot 4 1910417 +2 hybrid scale_wrand 4 4827 +2 hybrid lock_distinct 8 15369611 +2 hybrid lock_shared 8 7163003 +2 hybrid scale_rhot 8 2657131 +2 hybrid scale_wrand 8 11524 +2 pthread lock_distinct 1 10701097 +2 pthread lock_shared 1 10737929 +2 pthread scale_rhot 1 2239091 +2 pthread scale_wrand 1 2863 +2 pthread lock_distinct 2 8826231 +2 pthread lock_shared 2 7880359 +2 pthread scale_rhot 2 1913071 +2 pthread scale_wrand 2 3293 +2 pthread lock_distinct 4 12730976 +2 pthread lock_shared 4 10074138 +2 pthread scale_rhot 4 1750269 +2 pthread scale_wrand 4 5431 +2 pthread lock_distinct 8 11200118 +2 pthread lock_shared 8 11362470 +2 pthread scale_rhot 8 1774082 +2 pthread scale_wrand 8 10212 +3 pthread lock_distinct 1 11025974 +3 pthread lock_shared 1 10015721 +3 pthread scale_rhot 1 2192223 +3 pthread scale_wrand 1 2381 +3 pthread lock_distinct 2 8466316 +3 pthread lock_shared 2 7920148 +3 pthread scale_rhot 2 2018662 +3 pthread scale_wrand 2 3984 +3 pthread lock_distinct 4 12332508 +3 pthread lock_shared 4 11295065 +3 pthread scale_rhot 4 1458100 +3 pthread scale_wrand 4 5145 +3 pthread lock_distinct 8 12065440 +3 pthread lock_shared 8 12389582 +3 pthread scale_rhot 8 2152572 +3 pthread scale_wrand 8 10291 +3 hybrid lock_distinct 1 11995767 +3 hybrid lock_shared 1 12131426 +3 hybrid scale_rhot 1 2282619 +3 hybrid scale_wrand 1 2515 +3 hybrid lock_distinct 2 12555868 +3 hybrid lock_shared 2 9814648 +3 hybrid scale_rhot 2 1970612 +3 hybrid scale_wrand 2 3473 +3 hybrid lock_distinct 4 14250381 +3 hybrid lock_shared 4 11890017 +3 hybrid scale_rhot 4 2663253 +3 hybrid scale_wrand 4 6083 +3 hybrid lock_distinct 8 15577427 +3 hybrid lock_shared 8 14746791 +3 hybrid scale_rhot 8 1491853 +3 hybrid scale_wrand 8 9976 +4 hybrid lock_distinct 1 12021594 +4 hybrid lock_shared 1 11920905 +4 hybrid scale_rhot 1 2289593 +4 hybrid scale_wrand 1 2264 +4 hybrid lock_distinct 2 14833322 +4 hybrid lock_shared 2 11984525 +4 hybrid scale_rhot 2 1939272 +4 hybrid scale_wrand 2 3692 +4 hybrid lock_distinct 4 10359099 +4 hybrid lock_shared 4 11188819 +4 hybrid scale_rhot 4 2222426 +4 hybrid scale_wrand 4 5701 +4 hybrid lock_distinct 8 16156274 +4 hybrid lock_shared 8 11121170 +4 hybrid scale_rhot 8 2321331 +4 hybrid scale_wrand 8 10769 +4 pthread lock_distinct 1 10684773 +4 pthread lock_shared 1 10849414 +4 pthread scale_rhot 1 2077898 +4 pthread scale_wrand 1 2381 +4 pthread lock_distinct 2 8466808 +4 pthread lock_shared 2 7802181 +4 pthread scale_rhot 2 1879061 +4 pthread scale_wrand 2 3081 +4 pthread lock_distinct 4 10385990 +4 pthread lock_shared 4 9644291 +4 pthread scale_rhot 4 1581297 +4 pthread scale_wrand 4 5781 +4 pthread lock_distinct 8 9031946 +4 pthread lock_shared 8 9795186 +4 pthread scale_rhot 8 1642625 +4 pthread scale_wrand 8 9429 +5 pthread lock_distinct 1 10834350 +5 pthread lock_shared 1 10474929 +5 pthread scale_rhot 1 2242332 +5 pthread scale_wrand 1 2601 +5 pthread lock_distinct 2 8318810 +5 pthread lock_shared 2 7627386 +5 pthread scale_rhot 2 1644482 +5 pthread scale_wrand 2 2976 +5 pthread lock_distinct 4 9821823 +5 pthread lock_shared 4 10389436 +5 pthread scale_rhot 4 1633501 +5 pthread scale_wrand 4 5833 +5 pthread lock_distinct 8 11097331 +5 pthread lock_shared 8 10663050 +5 pthread scale_rhot 8 1742593 +5 pthread scale_wrand 8 9000 +5 hybrid lock_distinct 1 11119446 +5 hybrid lock_shared 1 11657149 +5 hybrid scale_rhot 1 2327404 +5 hybrid scale_wrand 1 2500 +5 hybrid lock_distinct 2 14754241 +5 hybrid lock_shared 2 11284576 +5 hybrid scale_rhot 2 1996138 +5 hybrid scale_wrand 2 3345 +5 hybrid lock_distinct 4 15376567 +5 hybrid lock_shared 4 10966036 +5 hybrid scale_rhot 4 1398509 +5 hybrid scale_wrand 4 5819 +5 hybrid lock_distinct 8 13532595 +5 hybrid lock_shared 8 11862925 +5 hybrid scale_rhot 8 2039497 +5 hybrid scale_wrand 8 10017 +6 hybrid lock_distinct 1 11680979 +6 hybrid lock_shared 1 11812459 +6 hybrid scale_rhot 1 2300980 +6 hybrid scale_wrand 1 2130 +6 hybrid lock_distinct 2 12911656 +6 hybrid lock_shared 2 11247456 +6 hybrid scale_rhot 2 1969341 +6 hybrid scale_wrand 2 3682 +6 hybrid lock_distinct 4 13312235 +6 hybrid lock_shared 4 11132727 +6 hybrid scale_rhot 4 2183452 +6 hybrid scale_wrand 4 5536 +6 hybrid lock_distinct 8 15058279 +6 hybrid lock_shared 8 10757331 +6 hybrid scale_rhot 8 1513878 +6 hybrid scale_wrand 8 9622 +6 pthread lock_distinct 1 10815367 +6 pthread lock_shared 1 10728985 +6 pthread scale_rhot 1 2128850 +6 pthread scale_wrand 1 2566 +6 pthread lock_distinct 2 8412044 +6 pthread lock_shared 2 8009250 +6 pthread scale_rhot 2 1927090 +6 pthread scale_wrand 2 2713 +6 pthread lock_distinct 4 10016552 +6 pthread lock_shared 4 8593827 +6 pthread scale_rhot 4 1374249 +6 pthread scale_wrand 4 5348 +6 pthread lock_distinct 8 10838935 +6 pthread lock_shared 8 11749280 +6 pthread scale_rhot 8 1892281 +6 pthread scale_wrand 8 6070 +7 pthread lock_distinct 1 8202068 +7 pthread lock_shared 1 8369625 +7 pthread scale_rhot 1 1654494 +7 pthread scale_wrand 1 2121 +7 pthread lock_distinct 2 7377608 +7 pthread lock_shared 2 6942131 +7 pthread scale_rhot 2 1243845 +7 pthread scale_wrand 2 3812 +7 pthread lock_distinct 4 10474031 +7 pthread lock_shared 4 9988546 +7 pthread scale_rhot 4 1173334 +7 pthread scale_wrand 4 3994 +7 pthread lock_distinct 8 9666901 +7 pthread lock_shared 8 7092235 +7 pthread scale_rhot 8 1962918 +7 pthread scale_wrand 8 8493 +7 hybrid lock_distinct 1 10591950 +7 hybrid lock_shared 1 10858231 +7 hybrid scale_rhot 1 2095259 +7 hybrid scale_wrand 1 2522 +7 hybrid lock_distinct 2 12043062 +7 hybrid lock_shared 2 11343565 +7 hybrid scale_rhot 2 1908552 +7 hybrid scale_wrand 2 3634 +7 hybrid lock_distinct 4 14133907 +7 hybrid lock_shared 4 12732907 +7 hybrid scale_rhot 4 2658091 +7 hybrid scale_wrand 4 6135 +7 hybrid lock_distinct 8 19355491 +7 hybrid lock_shared 8 13325351 +7 hybrid scale_rhot 8 2626685 +7 hybrid scale_wrand 8 10129 diff --git a/test/bench/F7-MACOS-HYBRID-2026-10/stats.py b/test/bench/F7-MACOS-HYBRID-2026-10/stats.py new file mode 100644 index 000000000..ac626734a --- /dev/null +++ b/test/bench/F7-MACOS-HYBRID-2026-10/stats.py @@ -0,0 +1,23 @@ +import csv, statistics as st, collections, sys, random +random.seed(1) +def load(p): + d = collections.defaultdict(list) + for r in csv.DictReader(open(p), delimiter='\t'): + d[(r['bench'], int(r['threads']), r['arm'])].append(float(r['ops_per_sec'])) + return d +def boot_ci(p, h, n=4000): + # bootstrap CI on the ratio of medians + rs = sorted(st.median(random.choices(h, k=len(h))) / st.median(random.choices(p, k=len(p))) for _ in range(n)) + return rs[int(.025*n)], rs[int(.975*n)] +for path in sys.argv[1:]: + d = load(path) + print(f"== {path.split('/')[2]} ==") + print(f" {'bench':14}{'thr':>4}{'pthread':>12}{'hybrid':>12}{'ratio':>7}{'95% CI':>15}{'cv_p':>6}{'cv_h':>6} verdict") + for b, t in sorted({(b, t) for b, t, _ in d}): + p, h = d[(b, t, 'pthread')], d[(b, t, 'hybrid')] + mp, mh = st.median(p), st.median(h) + lo, hi = boot_ci(p, h) + cv = lambda x: 100 * st.pstdev(x) / st.mean(x) + v = "faster" if lo > 1.0 else ("SLOWER" if hi < 1.0 else "~") + if max(cv(p), cv(h)) >= 10: v += " (noisy)" + print(f" {b:14}{t:>4}{mp:>12.0f}{mh:>12.0f}{mh/mp:>7.2f} [{lo:.2f},{hi:.2f}]{cv(p):>6.1f}{cv(h):>6.1f} {v}")