Skip to content

Commit

Permalink
Faster Python - 1st version
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed May 13, 2024
1 parent 256591a commit 335f814
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
34 changes: 34 additions & 0 deletions docs/faster_python.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>How to make Python faster</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/simple.css">
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown="faster_python.md">
</section>
</div>
</div>
<script type="application/javascript" src="dist/reveal.js"></script>
<script type="application/javascript" src="plugin/notes/notes.js"></script>
<script type="application/javascript" src="plugin/markdown/markdown.js"></script>
<script type="application/javascript" src="plugin/highlight/highlight.js"></script>
<script type="application/javascript">
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
plugins: [ RevealMarkdown, RevealHighlight ]
});
</script>
</body>
</html>

33 changes: 33 additions & 0 deletions docs/faster_python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# How to make Python faster

AOT, JIT and noGIL technologies

---

* Pavel Tišnovský
* [email protected]

![Python](images/python.png)

---

# Where's the problem?

```python
def add_two_numbers(x, y):
return x + y


z = add_two_numbers(123, 456)
print(z)

```
---

# Solutions

* AOT compiler
- Cython
* JIT compiler
- Numba

1 change: 1 addition & 0 deletions docs/faster_python.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
One of the drawbacks of Python is that applications run relatively slowly written in this language. However, nowadays the situation is not bad at all, because there are both JIT (Just In Time) and AOT (Ahead of Time) Python compilers. What's more, the classic CPython is constantly being improved, with a relatively big performance leap taking place with Python version 3.11. There is also a variant of CPython without Global Interpreter Lock (GIL). In this lecture, we will introduce Numba (JIT), mypyc (AOT) and Python technologies without GIL.
3 changes: 2 additions & 1 deletion docs/index_python.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ <h1>Python ecosystem</h1>
<li><a href="functional_python.html">Functional Python</a></li>
<li><a href="mypy.html">Type annotations and static type checking for Python</a></li>
<li><a href="modern_python.html">Evoluce Pythonu (CZ)</a></li>
<li><a href="faster_python.html">How to make Python faster</a></li>
<li><a href="fastapi.html">FastAPI</a></li>
<li><a href="xarray.html">Xarray: labelled multi-dimensional arrays in Python</a></li>
<li><a href="python_data_science.html">Data science s vyu&#382;it&#237;m Pythonu</a></li>
<li><a href="python_data_science.html">Data science s vyu&#382;it&#237;m Pythonu (CZ)</a></li>
</ul>
</body>
</html>

0 comments on commit 335f814

Please sign in to comment.