Urgent.News

What's breaking now, across thousands of outlets.

Tech

One Rust Patch, Two Workloads: Catching Regressions with CodSpeed

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,…

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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Faceless Video Automation in n8n: Outline, Costs, Limits

Faceless video automation in n8n means chaining nodes so an idea goes in one end and a narrated video comes out the other: a trigger, an LLM for the script, a text to speech call, an image step and a…

  • Faceless video automation in n8n involves chained nodes for idea-to-narrated-video workflow
  • Services include LLM, voice, image source, and renderer nodes for video creation
  • Costs are time and upkeep due to service accounts, API changes, and rate limits

More from Friday 20 November →