Hacker GitHub

← All repos

mypyc/mypyc

View on GitHub ↗ ★ 2,026

Compile type annotated Python to fast C extensions

29 mentions on Hacker News by 27 people: 4 stories, 25 comments · first 2018-10-18 · latest 2026-10-28

Mentions per year 29 mentions · busiest year 2019 (8)
20082026
  1. …if you think about it! 95.61% reduction in time 2180.15% increase in performance 22.80x faster [1] https://github.com/mypyc/mypyc
    comment by stefanos82 · 2026-10-28 · in Python's experimental JIT to be removed
  2. 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?
  3. …[1], which seems to complete the circle somehow in my mind. [0] https://www.mypy-lang.org/ [1] https://github.com/mypyc/mypyc
    comment by tpoacher · 2026-03-08 · in Warn about PyPy being unmaintained
  4. …beartype, trycast; mypyc ] mypyc/mypyc: Compile type annotated Python to fast C extensions https://github.com/mypyc/mypyc src: https://github.com/python/mypy/tree/master/mypyc .. docs: https://mypyc.readthedocs.io/en/latest/ : mypyc docs >…
  5. …interpreter too). The other option is mypyc, though again that seems to mostly speed up runtime https://github.com/mypyc/mypyc Now if I use `python -S` (disables `import site` on initialization), that gets down to ~15ms execution time for…
  6. You're in luck! https://github.com/mypyc/mypyc
  7. ( https://github.com/mypyc/mypyc ) That's cool! > Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code. Mypyc uses mypy to perform type checking and type inference. > > Mypyc can compile…
  8. s/will never be/already is/g https://github.com/mypyc/mypyc You can compile python to c. Right now. Compatibility with extensions still needs a bit of work. But you can write extremely strict python. That's without getting into things like…
  9. …extension). Wanted to give you a head-start on the lit-review for your students I guess :) [0] https://github.com/mypyc/mypyc
    comment by davidatbu · 2023-05-22 · in Writing Python like it's Rust
  10. …using mypyc to compile mypy since 2019, giving it a 4x performance boost over regular Python.” [0] https://github.com/mypyc/mypyc
    comment by dragonwriter · 2023-05-08 · in Codon: Python Compiler
  11. mypyc does that: https://github.com/mypyc/mypyc > Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code. Mypyc uses mypy to perform type checking and type inference. > Mypyc can compile…
  12. …reading the C++wg release notes in the same mood that you would the python release notes. [1] https://github.com/mypyc/mypyc
    comment by omershapira · 2023-01-27 · in The Python Paradox (2004)
  13. …tracker lives in this repository! Please don't file mypyc issues in the mypy issue tracker. See https://github.com/mypyc/mypyc/blob/master/show_me_the_code....
  14. What's the difference with mypyc [0] ? It also compiles Python to native code. [0]: https://github.com/mypyc/mypyc
  15. https://github.com/mypyc/mypyc > Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code. Mypyc uses mypy to perform type checking and type inference.
    comment by staticassertion · 2022-07-06 · in Python 3.11 vs 3.10 performance
  16. …boost over regular Python. Does anyone know how mypyc and Nuitka compare in practice? [0]: https://github.com/mypyc/mypyc
    comment by codethief · 2021-06-17 · in Nuitka: a Python compiler written in Python
  17. ▲ 4
    mypyc – Compile type annotated Python to fast C extensions
    story by WoodenChair · 2021-03-19 · 0 comments
  18. …info, mypyc is “not really” ready for broader use yet. The devs are planning a soft-launch: https://github.com/mypyc/mypyc/issues/780 It is quite promising though, if it becomes more robust and compatible. I also believe they have still…
    comment by syastrov · 2021-02-23 · in Mypyc: Compile type-annotated Python to C
  19. …issue that mentions targeting LLVM or other targets https://github.com/python/mypy/issues/8373 https://github.com/mypyc/mypyc/issues/709
  20. …to, since it's the best option so far. Though, now that another commenter pointed out mypyc: https://github.com/mypyc/mypyc I believe I'll invest my limited free-time in that project instead, as it will allow me to stay within the Python…
    comment by timothycrosley · 2019-10-21 · in Python at Scale: Strict Modules
  21. …your typed program into a lower-level target language and compile it into a native binary. See https://github.com/mypyc/mypyc and https://github.com/cython/cython/wiki/Python-Typing-Proposal
    comment by ghostwriter · 2019-04-19 · in Types will be part of Ruby 3 stdlib source
  22. …which I think is very interesting too. [0]: https://github.com/python/mypy/graphs/contributors [1]: https://github.com/mypyc/mypyc
  23. It's already being done: https://github.com/mypyc/mypyc
  24. No, but there's also mypyc if you're interested in that area: https://github.com/mypyc/mypyc
  25. …problem with GIL. Mypy team currently works on compiler based on static type annotation: https://github.com/mypyc/mypyc I think they could gain much more performance than Pypy.
  26. ▲ 2
    Mypyc: Mypy to Python C Extension Compiler
    story by pddubs · 2019-01-17 · 0 comments
  27. ▲ 2
    Dropbox Compiler from type annotated Python to C extensions
    story by bratao · 2019-01-07 · 0 comments
  28. …code: https://cython.readthedocs.io/en/latest/src/tutorial/pure.ht... mypyc is another approach: https://github.com/mypyc/mypyc Nutika wants to utilize Python type annotations as well: https://github.com/Nuitka/Nuitka I guess there are…
    comment by Rotareti · 2018-12-12 · in Type hints cheat sheet (Python 3)
  29. ▲ 4
    Compiler from type annotated Python to C extensions
    story by anreekoh · 2018-10-18 · 0 comments