lift your speed limits with cython - archive.fosdem.org · nltk, spacy – text analysis tornado,...
TRANSCRIPT
![Page 1: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/1.jpg)
Lift your Speed Limits with Cython
Stefan Behnel <[email protected]>
FOSDEM, Bruxelles, February 2018
![Page 2: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/2.jpg)
TrustScore® and Meta-Reviews
![Page 3: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/3.jpg)
TrustYou Analytics
3 Mio. new text reviews every week
![Page 4: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/4.jpg)
Why do we use Python ?
4
● Great programming language– versatle, pragmatc, concise, readable
● Community is diverse, friendly and helpful– well supported and documented
● Excellent libraries and tools– big data, NLP, web services,
automaton, testng, ...
![Page 5: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/5.jpg)
Tools we use at TrustYou
5
● NumPy – fast matrix/array computaton● SciPy – advanced scientfc algorithms● Scikit-learn – machine learning● Pandas – data analysis● NLTK, SpaCy – text analysis● Tornado, asyncio – async web services● lxml – XML / HTML parsing + processing● ...
![Page 6: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/6.jpg)
● NumPy● SciPy● Scikit-learn● Pandas● NLTK, SpaCy● Tornado, asyncio● lxml● ...
Tools we use at TrustYou
6
Python Data ecosystem:
● NumPy integrates Data● Cython integrates Code
![Page 7: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/7.jpg)
● Fastest way to integrate natve code● Producton proven● Widely used● All about «getng things done»
– Pragmatc programming language
– Keeps focus on functonality, not boilerplate
– Allows moving freely between Python and C/C++
– As pythonic as you want, as natve as you need
● “We write C so you don‘t have to”
Why Cython?
7
![Page 8: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/8.jpg)
Demo
8
![Page 9: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/9.jpg)
Ideas for future features
9
● Comprehensions into C++ containers– vector(i*2 for i in range(8))
● Inline generators into loops– also in OpenMP parallel code
● @total_ordering decorator for extension types (C-implemented classes)– less code for fast object comparisons
● More sophistcated type inference
![Page 10: Lift your Speed Limits with Cython - archive.fosdem.org · NLTK, SpaCy – text analysis Tornado, asyncio – async web services lxml – XML / HTML parsing + processing ... NumPy](https://reader030.vdocument.in/reader030/viewer/2022041206/5d5a704b88c9939c0d8b51fe/html5/thumbnails/10.jpg)
Thanks!Any questons?
You can reach me at:[email protected]
10
Oh, and visit www.trustyou.com- check your next hotel
- we’re hiring :)