{"slug": "mypyc", "name": "mypyc", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 7, "warners": 2, "score": 1.975, "rising": 1.35, "first": "2025-12-12", "latest": "2026-10-28", "why": "for using your existing code as it is and gain massive performance improvements, mypyc it's a must!", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 0, "compare": 1, "warn": 2}, "spark": [0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2], "listed": true, "loved": [], "caveat": "", "short_quote": "for using your existing code as it is and gain massive performance improvements, mypyc it's a must!", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/mypyc/mypyc", "official_url": "https://github.com/mypyc/mypyc", "pricing": "", "aliases": ["mypyc"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 804338880, "item_id": 50271180, "url": "https://news.ycombinator.com/item?id=50271180", "by": "stefanos82", "date": "2026-10-28", "stance": "recommend", "quote": "for using your existing code as it is and gain massive performance improvements, mypyc it's a must!", "excerpt": "If you want to use the same code unmodified *and* your code uses type hints, then you should use mypyc [1]. There are times that it generates faster code than Cython! Of course with Cython you can tweak it and push its limits with various optimizations and other techniques, but for using your existing code as it is and gain massive performance improvements, mypyc it's a must! Code sample: import time def fib(n: int) ", "context": "", "use_case": "", "switched_from": "", "story": "Python's experimental JIT to be removed"}, {"id": 804274032, "item_id": 50267127, "url": "https://news.ycombinator.com/item?id=50267127", "by": "grep_it", "date": "2026-10-27", "stance": "recommend", "quote": "I've had good success with just using mypyc", "excerpt": "I've had good success with just using mypyc (https://mypyc.readthedocs.io/en/latest/introduction.html) on typed python code.", "context": "", "use_case": "compiling typed Python", "switched_from": "", "story": "Python's experimental JIT to be removed"}, {"id": 745779952, "item_id": 46611247, "url": "https://news.ycombinator.com/item?id=46611247", "by": "Qem", "date": "2026-01-13", "stance": "recommend", "quote": "Mypyc will do.", "excerpt": "> mypy won't make your Python faster Mypyc will do. See https://blog.glyph.im/2022/04/you-should-compile-your-python-and-heres-why.html", "context": "", "use_case": "Compiling Python for speed", "switched_from": "", "story": "Anthropic has made a large contribution to the Python Software Foundation"}, {"id": 744791730, "item_id": 46549483, "url": "https://news.ycombinator.com/item?id=46549483", "by": "westurner", "date": "2026-01-08", "stance": "recommend", "quote": "Mypyc ensures type safety both statically and at runtime.", "excerpt": "icontract or pycontracts -like DbC Design-by-Contract type and constraint checking at runtime with or as fast as astral-sh/ty would make type annotations useful at runtime \"Support runtime checking\" : https://github.com/astral-sh/ty/issues/867 : > [ typeguard, beartype, trycast; mypyc ] mypyc/mypyc: Compile type annotated Python to fast C extensions https://github.com/mypyc/mypyc src: https://github.com/python/mypy/t", "context": "", "use_case": "", "switched_from": "", "story": "Why AI is pushing developers toward typed languages"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 778746081, "item_id": 48671630, "url": "https://news.ycombinator.com/item?id=48671630", "by": "dima-quant", "date": "2026-06-25", "stance": "warn", "quote": "mypyc does not support compilation to a native executable and the performance gains were somehow limited to 2x-4x", "excerpt": "Yeah, indeed, I actually read about mypyc a few years ago before starting nimic. Though the goal is very similar, mypyc does not support compilation to a native executable and the performance gains were somehow limited to 2x-4x, as reported in https://sichard.ca/blog/2022/05/compiling-black-with-mypyc-part-1/", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Nimic \u2013 Pure Python as a systems language with AOT compilation"}, {"id": 778742560, "item_id": 48671410, "url": "https://news.ycombinator.com/item?id=48671410", "by": "delijati", "date": "2026-06-25", "stance": "warn", "quote": "so it is what https://github.com/mypyc/mypyc was supposed to be", "excerpt": "so it is what https://github.com/mypyc/mypyc was supposed to be ... i can just use write my python code add some type hints and it should run faster ... like cython but without learning a new dsl?", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Nimic \u2013 Pure Python as a systems language with AOT compilation"}]}], "who": [], "tags": [], "use_cases": ["compiling typed python", "compiling python for speed", "python speedup"], "compared": [{"slug": "cython", "name": "Cython", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=50257419", "title": "Python's experimental JIT to be removed", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=48646239", "title": "Show HN: Nimic \u2013 Pure Python as a systems language with AOT compilation", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=46601902", "title": "Anthropic has made a large contribution to the Python Software Foundation", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46547981", "title": "Why AI is pushing developers toward typed languages", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46192748", "title": "Python Workers redux: fast cold starts, packages, and a uv-first workflow", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"compare": 1}, "2026-01": {"recommend": 2}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {"warn": 2}, "2026-07": {}, "2026-08": {}, "2026-09": {}, "2026-10": {"recommend": 2}}, "quotes": [{"id": 804338880, "item_id": 50271180, "url": "https://news.ycombinator.com/item?id=50271180", "by": "stefanos82", "date": "2026-10-28", "stance": "recommend", "quote": "for using your existing code as it is and gain massive performance improvements, mypyc it's a must!", "excerpt": "If you want to use the same code unmodified *and* your code uses type hints, then you should use mypyc [1]. There are times that it generates faster code than Cython! Of course with Cython you can tweak it and push its limits with various optimizations and other techniques, but for using your existing code as it is and gain massive performance improvements, mypyc it's a must! Code sample: import time def fib(n: int) ", "context": "", "use_case": "", "switched_from": "", "story": "Python's experimental JIT to be removed"}, {"id": 804274032, "item_id": 50267127, "url": "https://news.ycombinator.com/item?id=50267127", "by": "grep_it", "date": "2026-10-27", "stance": "recommend", "quote": "I've had good success with just using mypyc", "excerpt": "I've had good success with just using mypyc (https://mypyc.readthedocs.io/en/latest/introduction.html) on typed python code.", "context": "", "use_case": "compiling typed Python", "switched_from": "", "story": "Python's experimental JIT to be removed"}, {"id": 778746081, "item_id": 48671630, "url": "https://news.ycombinator.com/item?id=48671630", "by": "dima-quant", "date": "2026-06-25", "stance": "warn", "quote": "mypyc does not support compilation to a native executable and the performance gains were somehow limited to 2x-4x", "excerpt": "Yeah, indeed, I actually read about mypyc a few years ago before starting nimic. Though the goal is very similar, mypyc does not support compilation to a native executable and the performance gains were somehow limited to 2x-4x, as reported in https://sichard.ca/blog/2022/05/compiling-black-with-mypyc-part-1/", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Nimic \u2013 Pure Python as a systems language with AOT compilation"}, {"id": 778742560, "item_id": 48671410, "url": "https://news.ycombinator.com/item?id=48671410", "by": "delijati", "date": "2026-06-25", "stance": "warn", "quote": "so it is what https://github.com/mypyc/mypyc was supposed to be", "excerpt": "so it is what https://github.com/mypyc/mypyc was supposed to be ... i can just use write my python code add some type hints and it should run faster ... like cython but without learning a new dsl?", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Nimic \u2013 Pure Python as a systems language with AOT compilation"}, {"id": 745779952, "item_id": 46611247, "url": "https://news.ycombinator.com/item?id=46611247", "by": "Qem", "date": "2026-01-13", "stance": "recommend", "quote": "Mypyc will do.", "excerpt": "> mypy won't make your Python faster Mypyc will do. See https://blog.glyph.im/2022/04/you-should-compile-your-python-and-heres-why.html", "context": "", "use_case": "Compiling Python for speed", "switched_from": "", "story": "Anthropic has made a large contribution to the Python Software Foundation"}, {"id": 744791730, "item_id": 46549483, "url": "https://news.ycombinator.com/item?id=46549483", "by": "westurner", "date": "2026-01-08", "stance": "recommend", "quote": "Mypyc ensures type safety both statically and at runtime.", "excerpt": "icontract or pycontracts -like DbC Design-by-Contract type and constraint checking at runtime with or as fast as astral-sh/ty would make type annotations useful at runtime \"Support runtime checking\" : https://github.com/astral-sh/ty/issues/867 : > [ typeguard, beartype, trycast; mypyc ] mypyc/mypyc: Compile type annotated Python to fast C extensions https://github.com/mypyc/mypyc src: https://github.com/python/mypy/t", "context": "", "use_case": "", "switched_from": "", "story": "Why AI is pushing developers toward typed languages"}, {"id": 739935522, "item_id": 46245970, "url": "https://news.ycombinator.com/item?id=46245970", "by": "kortex", "date": "2025-12-12", "stance": "compare", "quote": "The other option is mypyc, though again that seems to mostly speed up runtime", "excerpt": "You should look at the self-executing .pex file format (https://docs.pex-tool.org/whatispex.html). The whole python program exists as a single file. You can also unzip the .pex and inspect the dependency tree. It's tooling agnostic and there are a couple ways to generate them, but the easiest it to just use pants build. Pants also does dependency traversal (that's the main reason we started using it, deploying a micr", "context": "", "use_case": "Python speedup", "switched_from": "", "story": "Python Workers redux: fast cold starts, packages, and a uv-first workflow"}]}