👀 AOT and JIT compilation
Just-in-time:
- PyPy: compile the most frequent code
- Translate some code to LLVM (Numba). then compile it
Ahead-of-time:
- Python C-API: Writing code in C/C++/Rust and making an interface understandable for CPython
- Cython (uses C-API of Python interpreter)
- Numba can do AOT
📗 Back to the notebook…
🏁 Any questions?
148 µs ± 6.04 µs per loop
🐍 Python: multiprocessing/multithreading
🐍 Python: threadingmultiprocessing/multi
🐍 thonPy: multi/multithreading/processing
Process
- Process is a launched program
- Every process has isolated resources:
- virtual memory space
- pointer to execution place
- call stack
- system resources, e.g. file descriptors
- Alternative: a thread
Thread
- Threads are executed independently
- Threads are executed inside some process and can share memory space and system resources
- Managed by OS
Concurrency vs. Parallelism
Regular stuff
Multithreading!
Benchmark
joblib
🏁 Any questions?
Stuff to discuss
- how to stay sane
- practical deep learning
- course work
- exam
Useful links
In case you know something interesting, don’t hesitate to ping me!
Books
- Luciano Ramalho, Fluent Python, 1st edition, 2015.
- David M. Beazley, Brian K. Jones, Python Cookbook, 3rd edition, 2013.
Blogs
Python Tutorials – Real Python
Hynek’s Blog
Ship better Python software, faster
Courses
Learn computer programming | Online courses from JetBrains Academy
The Missing Semester of Your CS Education
GitHub Student Developer Pack
Many useful tools for developers. You can get this after confirming your education mail.
See education.github.com/pack.