You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+19-19
Original file line number
Diff line number
Diff line change
@@ -41,25 +41,25 @@ The script available in `tests/test_perf.py` measures performance comparing to t
41
41
42
42
Here are the result "on my machine" (Ubuntu in Virtualbox on a laptop):
43
43
```
44
-
byteswap list of int | x 8.204 ( 9.208us -> 1.122us)
45
-
byteswap str | x 6.433 ( 9.689us -> 1.506us)
46
-
calcsize | x149.423 ( 61.967us -> 0.415us)
47
-
compiled pack | x 43.227 ( 34.758us -> 0.804us)
48
-
compiled pack_dict | x 26.490 ( 34.951us -> 1.319us)
49
-
compiled pack_into | x 32.017 ( 39.522us -> 1.234us)
50
-
compiled pack_into_dict | x 26.817 ( 38.984us -> 1.454us)
51
-
compiled unpack | x 34.454 ( 31.814us -> 0.923us)
52
-
compiled unpack_dict | x 23.534 ( 34.071us -> 1.448us)
53
-
compiled unpack_from | x 27.170 ( 31.884us -> 1.174us)
54
-
compiled unpack_from_dict | x 22.600 ( 33.927us -> 1.501us)
55
-
pack | x 78.314 ( 105.593us -> 1.348us)
56
-
pack_dict | x 52.916 ( 106.748us -> 2.017us)
57
-
pack_into | x 82.233 ( 119.950us -> 1.459us)
58
-
pack_into_dict | x 45.214 ( 111.338us -> 2.462us)
59
-
unpack | x 82.712 ( 93.686us -> 1.133us)
60
-
unpack_dict | x 41.064 ( 91.473us -> 2.228us)
61
-
unpack_from | x 81.678 ( 95.729us -> 1.172us)
62
-
unpack_from_dict | x 40.379 ( 90.430us -> 2.240us)
44
+
byteswap list of int | x 8.779 ( 8.638us -> 0.984us)
45
+
byteswap str | x 17.466 ( 9.158us -> 0.524us)
46
+
calcsize | x139.330 ( 61.060us -> 0.438us)
47
+
compiled pack | x 47.389 ( 35.968us -> 0.759us)
48
+
compiled pack_dict | x 27.184 ( 34.588us -> 1.272us)
49
+
compiled pack_into | x 32.037 ( 38.650us -> 1.206us)
50
+
compiled pack_into_dict | x 27.343 ( 37.718us -> 1.379us)
51
+
compiled unpack | x 33.928 ( 31.278us -> 0.922us)
52
+
compiled unpack_dict | x 21.627 ( 31.597us -> 1.461us)
53
+
compiled unpack_from | x 30.622 ( 29.977us -> 0.979us)
54
+
compiled unpack_from_dict | x 20.479 ( 30.936us -> 1.511us)
55
+
pack | x 77.003 ( 103.030us -> 1.338us)
56
+
pack_dict | x 53.254 ( 103.255us -> 1.939us)
57
+
pack_into | x 82.829 ( 119.373us -> 1.441us)
58
+
pack_into_dict | x 52.173 ( 108.135us -> 2.073us)
59
+
unpack | x 78.459 ( 91.896us -> 1.171us)
60
+
unpack_dict | x 40.287 ( 89.300us -> 2.217us)
61
+
unpack_from | x 77.027 ( 91.202us -> 1.184us)
62
+
unpack_from_dict | x 39.467 ( 88.043us -> 2.231us)
63
63
```
64
64
65
65
*Disclaimer:* these results may and will vary largely depending on the number of elements and types you pack/unpack. This script is provided as-is, and I will gladly accept an improved script providing more reliable results.
0 commit comments