Commit 0b150fc
committed
gh-141863: Use bytearray.take_bytes in asyncio.streams
Uses gh-139871 to improve performance over 10% on asyncio_tcp
pyperformance benchmark. All the patterns optimize here are in the
`take_bytes` Python 3.15 What's New entry.
tb_base.json
============
Performance version: 1.13.0
Python version: 3.15.0a2+ (64-bit) revision 227b9d3
Report on Linux-6.17.8-arch1-1-x86_64-with-glibc2.42
Number of logical CPUs: 32
Start date: 2025-11-22 16:18:13.127794
End date: 2025-11-22 16:18:41.207577
tb_asyncio.json
===============
Performance version: 1.13.0
Python version: 3.15.0a2+ (64-bit) revision 6982581e422
Report on Linux-6.17.8-arch1-1-x86_64-with-glibc2.42
Number of logical CPUs: 32
Start date: 2025-11-22 16:13:46.913998
End date: 2025-11-22 16:14:14.140152
Mean +- std dev: 169 ms +- 2 ms -> 143 ms +- 6 ms: 1.18x faster
Significant (t=18.89)
Mean +- std dev: 546 ms +- 8 ms -> 533 ms +- 6 ms: 1.02x faster
Significant (t=6.02)1 parent 227b9d3 commit 0b150fc
1 file changed
+10
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
671 | | - | |
| 670 | + | |
672 | 671 | | |
673 | 672 | | |
674 | 673 | | |
| |||
678 | 677 | | |
679 | 678 | | |
680 | 679 | | |
681 | | - | |
682 | | - | |
| 680 | + | |
683 | 681 | | |
684 | | - | |
| 682 | + | |
685 | 683 | | |
686 | 684 | | |
687 | 685 | | |
| |||
716 | 714 | | |
717 | 715 | | |
718 | 716 | | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
726 | 721 | | |
727 | 722 | | |
728 | 723 | | |
729 | 724 | | |
730 | 725 | | |
731 | | - | |
732 | | - | |
| 726 | + | |
733 | 727 | | |
734 | 728 | | |
735 | 729 | | |
| |||
760 | 754 | | |
761 | 755 | | |
762 | 756 | | |
763 | | - | |
764 | | - | |
| 757 | + | |
765 | 758 | | |
766 | 759 | | |
767 | 760 | | |
768 | 761 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
| 762 | + | |
775 | 763 | | |
776 | 764 | | |
777 | 765 | | |
| |||
0 commit comments