September 6 2017 Niklas Bivald held a PyPy talk at PyCon Sweden. The name of the talk was "Using PyPy - a faster version of Python for long running applications - as a first step to speed up your application."
It shows synthetic and real world usage of using PyPy to speed up your application.
5. - Visualisation
- (Lots of) Statistics
- From classifications to
regressions
Data Parsers Analytics
... in it's rawest form ... bespoke, in
Python
6. $ python
Python 2.7.13 (default, Dec 18 2016,
07:03:39)
>>> print ("Hello World")
Hello World
>>>
>>> [x+1 for x in xrange(0,20, 2)]
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
>>>
$ python your-application.py
I'm a python application
$ pypy
Python 2.7.13[PyPy 5.8.0 with GCC 4.2.1]
on darwin
>>>> print ("Hello World")
Hello World
>>>>
>>> [x+1 for x in xrange(0,20, 2)]
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
>>>
$ pypy your-application.py
I'm a python application
Compliant
1
7. We've used PyPy in production since 2014, processing:
◦ Millions of flights
◦ Petabytes of data
◦ Thousands upon thousands of servers spun up
◦ 10 000 LOC + applications
Stable
2
8. $ time python -c "
> l = 0
> for i in xrange(0,10000):
> for ii in xrange(0, 10000):
> l = i+ii
> print(l)
> "
19998
real 0m8.101s
user 0m7.999s
time pypy -c "
> l = 0
> for i in xrange(0,10000):
> for ii in xrange(0, 10000):
> l = i+ii
> print(l)
> "
19998
real 0m0.201s
user 0m0.174s
Fast
3
SYNTHETIC BENCHMARK
9. Each second of flight data is divided into 256 words á 12 bit. Each
12 bit section contains between 3 to 12 parameters. To extract, we
iterate bit-by-bit on the continuous byte stream.
10. $ pypy run-file.py
AircraftDfdrDataPoint: created a new dfdr
datapoint
Task parse.blackbox.data succeeded in
18.82s
$ python run-file.py
AircraftDfdrDataPoint: created a new dfdr
datapoint
Task parse.blackbox.data succeeded in
46.25s
Fast
3
REAL WORLD BENCHMARK