LLVM JIT compiler as a function decorator
Project description
fastpy
Python made fast. Decorate your functions with @fast, we will infered the types you used, compile to machine code, and execute.
Free software: MIT license
Documentation: https://fastpy.readthedocs.io.
Biased test showing how fast fastpy is:
Initial code:
def long_loop(a):
for i in range(100000):
for j in range(10000):
a += 1
return a
print long_loop(0)
$ time python loop.py
1000000000
python test.py 39.24s user 0.01s system 99% cpu 39.420 total
$ time pypy loop.py
1000000000
pypy test.py 0.92s user 0.01s system 99% cpu 0.937 total
Now we modify the code to use fastpy
from fastpy import fast
@fast
def long_loop(a):
for i in range(100000):
for j in range(10000):
a += 1
return a
print long_loop(0)
$ time python loop.py
1000000000
python test.py 0.11s user 0.00s system 99% cpu 0.117 total
Credits
Based on this tutorial http://dev.stephendiehl.com/numpile/
History
0.1.0 (2016-07-09)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastpy-0.1.0.tar.gz
(19.9 kB
view hashes)
Built Distributions
fastpy-0.1.0-py2.py3-none-any.whl
(13.8 kB
view hashes)
fastpy-0.1.0-py2.7.egg
(29.5 kB
view hashes)
Close
Hashes for fastpy-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c04deb64cd7e100a694c80fa151894be7528897f345524ae27d93aa4de784b0c |
|
MD5 | 61365d5f4fa8c5d93b50c8c8d769ac4b |
|
BLAKE2b-256 | c43865b1c37630fb96347caf667c2f67c17cfca93cf890cbcbefff10a37f51bf |