Message409413
I wrote some microbenchs.
Patch: https://github.com/python/cpython/pull/30312/commits/b68176d081e19a3cedbaf2cdb31ecd7690421ec8
Environment:
macOS 12.1
clang 13.0.0
configure with --enable-optimizations
Result on microbench:
```
+--------------------------------------------+-------------------------+------------------------+
| Benchmark | ./opt_baseline/res.json | ./opt_patched/res.json |
+============================================+=========================+========================+
| print(a, b, c) | 917 ns | 820 ns: 1.12x faster |
+--------------------------------------------+-------------------------+------------------------+
| print(a, b, c, *v) | 1.56 us | 1.62 us: 1.04x slower |
+--------------------------------------------+-------------------------+------------------------+
| print(a, sep='', file=stdout) | 376 ns | 295 ns: 1.27x faster |
+--------------------------------------------+-------------------------+------------------------+
| print(*v, sep='', flush=True, file=stdout) | 2.02 us | 1.94 us: 1.04x faster |
+--------------------------------------------+-------------------------+------------------------+
| Geometric mean | (ref) | 1.05x faster |
+--------------------------------------------+-------------------------+------------------------+
Benchmark hidden because not significant (3): print(a), print(a, sep='', flush=True, file=stdout), print(a, b, c, *v, sep='', flush=True, file=stdout)
``` |
|
Date |
User |
Action |
Args |
2021-12-31 10:18:07 | colorfulappl | set | recipients:
+ colorfulappl, larry, erlendaasland |
2021-12-31 10:18:07 | colorfulappl | set | messageid: <1640945887.73.0.115848516756.issue46212@roundup.psfhosted.org> |
2021-12-31 10:18:07 | colorfulappl | link | issue46212 messages |
2021-12-31 10:18:07 | colorfulappl | create | |
|