---
title: "Discussion on \"How I made dependency injection in Python 130× faster: from reflection to compiling the graph\" | Hashnode"
description: "Discussion on \"How I made dependency injection in Python 130× faster: from reflection to compiling the graph\". From ~53 µs/op to 0.40: caching the plan, cutting a check that can't fire, and compiling the dependency graph — a number at every step."
url: "https://hashnode.com/posts/python-dependency-injection-130x-faster/6a33c0fa3b3dfcc00bd12037"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How I made dependency injection in Python 130× faster: from reflection to compiling the graph](https://vshulcz.hashnode.dev/python-dependency-injection-130x-faster?utm_source=hashnode&utm_medium=feed)

From ~53 µs/op to 0.40: caching the plan, cutting a check that can't fire, and compiling the dependency graph — a number at every step.

Jun 18 · 8 min read · vshulcz.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#performance](https://hashnode.com/tag/performance)
-   [#optimization](https://hashnode.com/tag/optimization)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Vlad Shulcz](https://hashnode.com/@vshulcz)

@vshulcz · Amsterdam, Netherlands

  
[View profile](https://hashnode.com/@vshulcz)

Python developer writing about backend architecture, testing, and small open-source tools.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
