typed_python
mypyc-benchmark-results
typed_python | mypyc-benchmark-results | |
---|---|---|
2 | 4 | |
194 | 10 | |
-0.5% | - | |
5.4 | 9.4 | |
3 months ago | 1 day ago | |
Python | ||
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typed_python
- Do Python Developers Want Static Typing?
-
Mypyc: Compile type-annotated Python to C
I am always keeping and eye on mypyc, typed_python (llvm Python compiler)[0] and nuitka[1]
I guess that because Python is extremely dynamic, we may never have a full everything-works compiler, but I’m excited about the possibility of this becoming some kind of intermediate step where different parts of the program get compiled when possible.
[0] https://github.com/APrioriInvestments/typed_python
mypyc-benchmark-results
-
LPython: Novel, Fast, Retargetable Python Compiler
This looks very cool ! There is also MyPyC which is not in the comparison table, but worth noting.
They have some benchmarks vs regular python here :
https://github.com/mypyc/mypyc-benchmark-results/blob/master...
One difference is that MyPyC compiles your code to a C extension, so your are still dependent on python. On the other hand you can call regular python libraries with the normal syntax while, in LPython, the "break-out" syntax to regular libraries isn't straightforward
In any case super exiting to see work going into AOT python
- Statically typed Python
-
I Want a New Duck
The post isn't about performance, and is aimed at people using Python for whatever reason, so, sure, retrofit away.
That said, if you care about the performance improvements that typing can give you with Mypy, you might want to look here:
https://github.com/mypyc/mypyc-benchmark-results/blob/master...
It won't be going toe to toe with Rust any time soon, but a 4x to 17x speedup is nothing to sneeze at.
-
Mypyc: Compile type-annotated Python to C
https://github.com/mypyc/mypyc-benchmark-results/blob/master...
What are some alternatives?
pyccel - Python extension language using accelerators
mypy - Optional static typing for Python
mypyc - Compile type annotated Python to fast C extensions
pex - A tool for generating .pex (Python EXecutable) files, lock files and venvs.
pydantic - Data validation using Python type hints
Plagiarism-checker-Python - A python project for checking plagiarism of documents based on cosine similarity
pyre-check - Performant type-checking for python.
lpython - Python compiler