Last active
January 29, 2024 11:02
-
-
Save sebres/0875a4a75c489b13b6cba8fc9adcc99a to your computer and use it in GitHub Desktop.
Result illustrating the regression of Tcl_ReadChars in absence of append (doubling of bytes in internal object used for read on every iteration), bug [da16d15574]
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
diff --git "a/result-org.txt" "b/result-fix.txt" | |
--- "a/result-org.txt" | |
+++ "b/result-fix.txt" | |
% # with 4KB buffersize: | |
% setup { set ch [::tclTestPerf-Chan::_get_test_chan 4096]; fconfigure $ch -buffersize } | |
4096 | |
% # 10 * 1M: | |
% read $ch [expr {int(1e6)}] | |
-6757.00 µs/# 10 # 147.99 #/sec 67.570 net-ms | |
+36189.9 µs/# 10 # 27.632 #/sec 361.899 net-ms | |
% # 10 * 2M: | |
% read $ch [expr {int(2e6)}] | |
-7606.70 µs/# 10 # 131.46 #/sec 76.067 net-ms | |
+142283.9 µs/# 10 # 7.028 #/sec 1422.839 net-ms | |
% # 10 * 10M: | |
% read $ch [expr {int(10e6)}] | |
-37384.6 µs/# 10 # 26.749 #/sec 373.846 net-ms | |
+4194017 µs/# 10 # 0.238 #/sec 41940.175 net-ms | |
% # 1 * 20M: | |
% read $ch; break | |
-79803.0 µs/# 1 # 12.531 #/sec 79.803 net-ms | |
+16742993 µs/# 1 # 0.060 #/sec 16742.993 net-ms | |
% cleanup { close $ch } | |
% # with 1MB buffersize: | |
% setup { set ch [::tclTestPerf-Chan::_get_test_chan 1048576]; fconfigure $ch -buffersize } | |
1048576 | |
% # 10 * 1M: | |
% read $ch [expr {int(1e6)}] | |
-3701.80 µs/# 10 # 270.14 #/sec 37.018 net-ms | |
+5515.10 µs/# 10 # 181.32 #/sec 55.151 net-ms | |
% # 10 * 2M: | |
% read $ch [expr {int(2e6)}] | |
-4105.30 µs/# 10 # 243.59 #/sec 41.053 net-ms | |
+3510.20 µs/# 10 # 284.88 #/sec 35.102 net-ms | |
% # 10 * 10M: | |
% read $ch [expr {int(10e6)}] | |
-22805.0 µs/# 10 # 43.850 #/sec 228.050 net-ms | |
+30793.2 µs/# 10 # 32.475 #/sec 307.932 net-ms | |
% # 1 * 20M: | |
% read $ch; break | |
-65264.0 µs/# 1 # 15.322 #/sec 65.264 net-ms | |
+101003.0 µs/# 1 # 9.901 #/sec 101.003 net-ms | |
% cleanup { close $ch } | |
******************************************************************************** | |
-Total 8 cases in 1.04 sec. (0.97 net-sec.): | |
-227427.400000 µs/# 62 # 64.005 #/sec 968.671 net-ms | |
+Total 8 cases in 60.99 sec. (60.97 net-sec.): | |
+21256305.300000 µs/# 62 # 1.017 #/sec 60967.094 net-ms | |
Average: | |
-28428.425000 µs/# 7 # 58 #/sec 121.084 net-ms | |
+2657038.162500 µs/# 7 # 1 #/sec 7620.887 net-ms | |
Min: | |
-3701.80 µs/# 10 # 270.14 #/sec 37.018 net-ms | |
+3510.20 µs/# 10 # 284.88 #/sec 35.102 net-ms | |
Max: | |
-79803.0 µs/# 1 # 12.531 #/sec 79.803 net-ms | |
+16742993 µs/# 1 # 0.060 #/sec 16742.993 net-ms | |
******************************************************************************** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment