Skip to content

Commit 68ba185

Browse files
committed
up
1 parent 79424a1 commit 68ba185

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/assets/perf.png

-22.8 KB
Binary file not shown.

docs/report.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Extending CPython has neglible to no overhead and allows to share large chunks o
129129

130130
We beat the `hashlib` standard library by 13.525 ns or 101703681.5 instructions. This was achieved using the `ctypes` library and the CPython-C-API.
131131

132+
Disabling the GIL while manually managing threads with the `multithreading` API showed a massive speedup, achieved by reducing the median time spent in system mode by 42x. However, the single threaded version was still faster.
133+
132134
![Median instructions per command](docs/assets/instructions_median.png){ width=100% }
133135

134136
![Median task clock per command](docs/assets/task_clock_median.png){ width=100% }
@@ -153,8 +155,7 @@ We beat the `hashlib` standard library by 13.525 ns or 101703681.5 instructions.
153155
|true |multiprocessing |map_async.py | 244913585430| 61218.555| 61.0370955| 0.2066270|
154156
|true |multiprocessing |map.py | 245013383854| 61259.295| 61.0844710| 0.2048880|
155157

156-
Disabling the GIL while manually managing the threads and memory using the `multithreading` API also showed very promising results.
157-
158+
<!--
158159
159160
# Addendum
160161
@@ -222,6 +223,8 @@ Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32
222223
ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
223224
```
224225
226+
-->
227+
225228
[^octo]: https://github.blog/news-insights/octoverse/octoverse-2024/#the-most-popular-programming-languages
226229
[^gil]: Wang, Z., Bu, D., Sun, A., Gou, S., Wang, Y., & Chen, L. (2022). An empirical study on bugs in python interpreters. IEEE Transactions on Reliability, 71(2), 716-734.
227230
[^color]: https://langdev.stackexchange.com/questions/3430/colored-vs-uncolored-functions

0 commit comments

Comments
 (0)