Optimizing Linux timestamps on x86: 30% faster custom timers without vDSO
By
hmpc
Hand-rolled, kettle-boiled, baked to perfection. Worth every minute at the bakery.
Summary
A deep technical exploration of optimizing Linux timestamps on x86 architecture, achieving 30% speed improvements over standard system clocks by implementing custom timers that bypass vDSO. The author details their experience building a low-latency C++ tracing client library for OpenTelemetry in a microsecond-scale pipeline, and explains the trade-offs, techniques, and niche use cases for such aggressive optimization. The article concludes that while the approach works, almost nobody should actually use it in production.
Key quotes
· 3 pulledTL;DR: We can speed up timestamps on x86 Linux by 30% and maintain the same precision as the standard system clock by implementing our own timers without relying on vDSO. Almost nobody should do this.
One of my pet projects at my last job was to introduce distributed tracing to a low-latency pipeline (think 1–10 microseconds per stage) using OpenTelemetry.
As part of this effort I spent a considerable amount of time designing, implementing, and optimising our own C++ tracing client library, as the official one has too much overhead.
You might also wanna read
Why small pull request policies can backfire on software quality
The article critiques a common software engineering policy that limits pull requests (PRs) to small sizes (e.g., 500 lines, few files). Whil
apenwarr.ca·2h agoHow Anthropic contains Claude's expanding access across its products
Anthropic describes how it has evolved its approach to granting Claude, its AI assistant, increasingly broad access to internal systems over
Testing Cursor's Jira integration: How ticket quality affects AI agent performance
Cursor launched a Jira integration that lets developers assign tickets directly to an AI agent, eliminating context switching. The author te
bit.ly·3h agoNetflix engineer's open-source tool cuts AI token usage by up to 90%
Netflix senior engineer Tejas Chopra created software called "Project Headroom" that prunes redundant tokens from AI agent instructions befo
Anthropic Releases Free Security Plugin for Claude Code Terminal to Detect Vulnerabilities
Anthropic has released a free security-guidance plugin for its Claude Code terminal tool that autonomously reviews code edits, model outputs
cybersecuritynews.com·4h agoResearcher's "ADHD" tool for Claude Code claims 2x improvement; experts call for more evidence
Solo researcher Udit Akhouri released a third-party Agent SDK tool called "ADHD" for Claude Code on Reddit, claiming it helps coding agents
bit.ly·4h ago