{
  "id": 20870376,
  "title": "One Rust Patch, Two Workloads: Catching Regressions with CodSpeed",
  "url": "https://urgent.news/2026/11/20/one-rust-patch-two-workloads-catching-regressions-with-codspeed",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-20T07:52:52.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jordanhudgens/one-rust-patch-two-workloads-catching-regressions-with-codspeed-4mh"
  },
  "original_language": "en",
  "account": "This tutorial demonstrates how to catch regressions in batch jobs that count unique event IDs using Rust. A patch replaces a BTreeSet with a small Vec, resulting in 24% fewer instructions on a benchmark with repeated IDs. However, when the benchmark contains unique IDs, the patch incurs 3.28 times more instruction references. The lab runs the patch on two batches with 2,048 IDs each, one with repeated IDs and the other with unique IDs. The goal is to identify the cause of the increased work in the second benchmark and fix the patch while preserving the performance gain on repeated IDs.",
  "summary": "You’re reviewing a Rust pull request that changes how a batch job counts unique event IDs. The tests pass, and on the first benchmark the patch uses about 24% fewer instructions than the original code. Would you merge it? Now try a second batch. Both batches contain 2,048 IDs. In the first, the same eight values repeat. In the second, every ID is different. The patch still gets the right answer,…",
  "key_points": [
    "Rust patch replaces BTreeSet with small Vec, reducing instructions by 24%",
    "Patch incurs 3.28x more instruction references with unique IDs benchmark",
    "Lab tests patch on two batches: 2,048 IDs each, one with repeats, one unique"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}