-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters