<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai" -->

---
title: Python: tprof 1.3.0: now with less overhead | daily.dev
description: tprof 1.3.0 is released with major performance improvements for this Python 3.12+ targeting profiler. Key changes include replacing Python data structures with...
canonical: https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Python: tprof 1.3.0: now with less overhead | daily.dev
og:description: tprof 1.3.0 is released with major performance improvements for this Python 3.12+ targeting profiler. Key changes include replacing Python data structures with...
og:url: https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai
og:image: https://api.daily.dev/og/posts/Z5Sx5ALaI.png
og:image:alt: Python: tprof 1.3.0: now with less overhead
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Python: tprof 1.3.0: now with less overhead

**[Adam Johnson](https://daily.dev/sources/adamj)** · 4 min read · 0 upvotes · 0 comments

## Summary

tprof 1.3.0 is released with major performance improvements for this Python 3.12+ targeting profiler. Key changes include replacing Python data structures with per-thread C structures storing raw int64_t nanosecond values, disabling sys.monitoring callbacks entirely for non-target code, and using PyTime_PerfCounterRaw() on Python 3.13+. Benchmarks show target function overhead reduced ~3×, non-target functions now run at full speed (zero overhead), memory use is 4× lower, and report generation is ~100× faster. New features include --json/--baseline flags for cross-branch performance comparisons, median replacing mean as the headline statistic (computed via quickselect in C), and programmatic access to results via FunctionStats objects yielded from the tprof() context manager/decorator.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://adamj.eu/tech/2026/08/08/python-tprof-performance>

## Questions this post answers

### What performance improvements does tprof 1.3.0 bring compared to earlier versions?

tprof 1.3.0 reduces target function call overhead by about 3x (from 439ns to 141ns extra per call on Python 3.13), eliminates overhead entirely for non-target functions, cuts memory use 4x (from 34.8 MiB to 8.0 MiB per million calls), and generates reports about 100x faster (from ~430ms to ~3ms per million calls). This comes from replacing Python dict/list storage with per-thread C structures and raw int64 nanosecond values, and disabling sys.monitoring callbacks for non-target code.

_Track profiling tool upgrades like this one on daily.dev to keep optimization workflows fast._

### How do I compare profiling results between two git branches using tprof?

Use the new --json and --baseline flags added in tprof 1.3.0. Run tprof with --json before.json on the baseline branch to save statistics to a file, then after checking out the change, run tprof again with --baseline before.json to get a delta column comparing each function's median timing against the saved run.

_daily.dev helps developers stay current on profiling and benchmarking workflows like this one._

### Why did tprof switch from reporting mean to median for profiling statistics?

tprof's headline statistic became the median instead of the mean because median is more robust to outliers common in profiling data, such as garbage collection pauses and cold caches. The median is computed exactly in C via quickselect over a scratch buffer at report time, so the change adds no recording overhead, only a small amount of extra work when the report is generated.

_Developers weighing profiling metrics can follow tooling changes like this on daily.dev._

## Similar posts on daily.dev

- [Python: introducing tprof, a targeting profiler](https://daily.dev/posts/python-introducing-tprof-a-targeting-profiler-ckmqw3ibi) · Adam Johnson · 38 upvotes · 1 comments
- [profiling.sampling — Statistical profiler ¶](https://daily.dev/posts/profiling-sampling-statistical-profiler--bd9rldcma) · Hacker News · 1 upvotes · 0 comments
- [Python 3.15 Has a Production Profiler. Python 3.15 Is Not Production-Ready.](https://daily.dev/posts/python-3-15-has-a-production-profiler-python-3-15-is-not-production-ready--wgbuvk9t9) · Medium · 1 upvotes · 0 comments
- [\#497: Faster than light profiling](https://daily.dev/posts/497-faster-than-light-profiling-iqkcdikzo) · Planet Python · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#performance](https://daily.dev/tags/performance)

[View this post on daily.dev](https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Python: tprof 1.3.0: now with less overhead","url":"https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai"},"datePublished":"2026-08-08T21:16:36.453Z","dateModified":"2026-09-14T08:44:13.889Z","description":"tprof 1.3.0 is released with major performance improvements for this Python 3.12+ targeting profiler. Key changes include replacing Python data structures with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2735f830eb62521bf40d100421db0771?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2735f830eb62521bf40d100421db0771?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Adam Johnson","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Adam Johnson","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/bf70f4401c284aa5b628d1966029342c","url":"https://daily.dev/sources/adamj"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,performance","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Adam Johnson","item":"https://daily.dev/sources/adamj"},{"@type":"ListItem","position":3,"name":"Python: tprof 1.3.0: now with less overhead"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai#faq","mainEntity":[{"@type":"Question","name":"What performance improvements does tprof 1.3.0 bring compared to earlier versions?","acceptedAnswer":{"@type":"Answer","text":"tprof 1.3.0 reduces target function call overhead by about 3x (from 439ns to 141ns extra per call on Python 3.13), eliminates overhead entirely for non-target functions, cuts memory use 4x (from 34.8 MiB to 8.0 MiB per million calls), and generates reports about 100x faster (from ~430ms to ~3ms per million calls). This comes from replacing Python dict/list storage with per-thread C structures and raw int64 nanosecond values, and disabling sys.monitoring callbacks for non-target code. Track profiling tool upgrades like this one on daily.dev to keep optimization workflows fast."}},{"@type":"Question","name":"How do I compare profiling results between two git branches using tprof?","acceptedAnswer":{"@type":"Answer","text":"Use the new --json and --baseline flags added in tprof 1.3.0. Run tprof with --json before.json on the baseline branch to save statistics to a file, then after checking out the change, run tprof again with --baseline before.json to get a delta column comparing each function's median timing against the saved run. daily.dev helps developers stay current on profiling and benchmarking workflows like this one."}},{"@type":"Question","name":"Why did tprof switch from reporting mean to median for profiling statistics?","acceptedAnswer":{"@type":"Answer","text":"tprof's headline statistic became the median instead of the mean because median is more robust to outliers common in profiling data, such as garbage collection pauses and cold caches. The median is computed exactly in C via quickselect over a scratch buffer at report time, so the change adds no recording overhead, only a small amount of extra work when the report is generated. Developers weighing profiling metrics can follow tooling changes like this on daily.dev."}}]}
```

