Skip to content
CAI
Software that uses CAICheck a score

sirupsen/napkin-math

50.0

Adequate · 29 September 2026

1.8k

lines of production code

Rust

with Go, Ruby

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Napkin Math is a multi-language benchmarking toolkit designed to estimate system performance and cloud costs from first principles. It provides comprehensive measurement capabilities for CPU, memory, I/O, and database operations across Rust, Go, and Ruby implementations. The system includes automated provisioning scripts and detailed base rate tables to facilitate reproducible performance analysis.

Features

Added newsletter 14 and 20 benchmarking scripts

Added initial scripts for newsletter 14 (syncing) and newsletter 20 (compound vs combining indexes), including a Jupyter notebook, Ruby benchmarking tools, and data population scripts to measure database query performance.

newsletter · high confidence

Added provisioning and utility scripts for the 'napkin box' environment

New scripts have been added to support the 'napkin box' development environment. The \provision.sh\ script automates the setup of a Linux environment by installing Go 1.18, Rust, Docker, Neovim, and various performance analysis and development tools (such as bpftrace, valgrind, and hyperfine). The \sync\ script facilitates synchronizing code to a remote Linux server for performance monitoring, while \toggle-hyperthreading\ provides a Ruby utility to enable or disable CPU hyperthreading to optimize measurement conditions.

script · high confidence

Initial release of Napkin benchmarking tool

The application has been initialized with a comprehensive set of benchmarks for file I/O (sequential and random reads/writes), memory operations, hashing (SHA-256), and database interactions (MySQL, Redis). The tool now supports command-line argument parsing via Clap, utilizes the Jemalloc allocator for performance, and provides detailed throughput and latency metrics for various operations.

src · high confidence

Behavioural changes

Project renamed to Napkin Math with updated performance benchmarks and cost tables

The project has been rebranded from 'Base Rates' to 'Napkin Math' to better reflect its purpose of estimating system performance from first principles. The README now includes a comprehensive table of base rates for operations such as memory reads, network latency, and blob storage, alongside a new section detailing approximate cloud cost numbers for CPU, GPU, memory, storage, and networking. A new \run\ script has been added to automate benchmark execution with specific Linux kernel tuning, and the LICENSE file was added under the MIT license.

(repo-wide) · high confidence

Replaced legacy memory benchmarks with comprehensive CPU and compression performance tests

The benchmarking suite has been restructured to provide more detailed performance insights. The previous simple sequential read/write benchmarks (base\_rates.rs) have been removed and replaced with new, more sophisticated benchmarks: compressed\_memory\_read.rs, which measures the performance of bitpacking compression and decompression using the BitPacker8x algorithm, and memory\_read.rs, which evaluates single-threaded and multi-threaded memory read throughput, including AVX2 vectorized and non-vectorized paths on x86\_64 architectures. This allows for a deeper analysis of memory bandwidth and CPU-specific optimizations.

benches · high confidence

Test coverage

Added Go benchmark suite for cell storage performance analysis

A new Go benchmark suite has been added to evaluate the performance of different cell storage strategies. The main program (\go/main.go\) includes experimental code comparing multi-dimensional arrays against various map-based approaches (using pointers to structs with different padding sizes) to measure node generation and multiplication times. Additionally, \go/main\_test.go\ provides a specific benchmark (\BenchmarkMapAccess\) that measures map access and arithmetic operations on 10 million cells using pointer-based structs.

go · high confidence

Dependencies

Initial dependency setup for Go, Ruby, and Rust projects

This change introduces the initial dependency manifests for the project's various language implementations. For the Go module, it defines the base module path and includes the \golang.org/x/text\ library. In the Ruby newsletter examples, it adds database driver dependencies (\mysql2\ for the syncing example, and \pg\, \mysql2\, and \fiber\_scheduler\ for the compound indexes example). For the main Rust application, it updates \Cargo.toml\ to rename the package to \napkin-math\, adds a comprehensive set of dependencies including \rand\, \sha2\, \redis\, \clap\, \jemallocator\, and \criterion\, and configures the release profile with debug symbols enabled.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 54 → 50 (-4.5)
  • Rubric changed (rubric-2026.09.10 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 93 → 92 (-0.9)
  • Architecture 100 → 100 (+0.0)
  • Maturity 49 → 41 (-7.8)
  • Readiness 52 → 36 (-15.7)
  • Security 48 → 69 (+20.9)
  • Performance 91 (new)

Resolved (1)

  • Documentation: no usage examples (README.md)

New (9)

  • Duplicated block (14 lines × 2) (go/main.go)
  • Duplicated block (14 lines × 4) (go/main.go)
  • Duplicated block (5 lines × 4) (go/main.go)
  • Duplicated block (5 lines × 4) (go/main.go)
  • Duplicated block (9 lines × 2) (go/main.go)
  • Further orphaned files (smaller)
  • Members sharing a duplicated core (5 members, 50+ identical tokens) (go/main.go)
  • Near-duplicate member family (4 members, 10 shared lines) (go/main.go)
  • Orphaned knowledge (src/main.rs)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sirupsen/napkin-math was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit aae5832fc5d7c6881b7a78f756e8863ec86c428b — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5ff527f25b99.