New submission from Shlomi Fish <shlo...@shlomifish.org>:
See: https://github.com/python/cpython/pull/14306 =================== 1. Merge two duplicate branches. 2. Extract some constants. 3. Convert to prefix-++ instead of suffix-++. =========== Benchmarks: before: + PATH=/home/shlomif/apps/python3/bin:/home/shlomif/apps/fcs/bin:/home/shlomif/progs/freecell/git/0fc-b/:/home/shlomif/progs/freecell/git/0fc-b//board_gen:/home/shlomif/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/neovim/bin:/home/shlomif/apps/fop/fop-20140425:/home/shlomif/apps/vim/bin:/home/shlomif/apps/golang/bin:/home/shlomif/.local/bin:/home/shlomif/.perl6/bin:/home/shlomif/.cargo/bin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/usr/games + export LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + python3 collect-stats.py 0fc-log.txt S 18474775 Int 617438 real 0m6.655s user 0m6.599s sys 0m0.054s + PATH=/home/shlomif/apps/python3/bin:/home/shlomif/apps/fcs/bin:/home/shlomif/progs/freecell/git/0fc-b/:/home/shlomif/progs/freecell/git/0fc-b//board_gen:/home/shlomif/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/neovim/bin:/home/shlomif/apps/fop/fop-20140425:/home/shlomif/apps/vim/bin:/home/shlomif/apps/golang/bin:/home/shlomif/.local/bin:/home/shlomif/.perl6/bin:/home/shlomif/.cargo/bin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/usr/games + export LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + python3 collect-stats.py 0fc-log.txt S 18474775 Int 617438 real 0m6.817s user 0m6.772s sys 0m0.045s + PATH=/home/shlomif/apps/python3/bin:/home/shlomif/apps/fcs/bin:/home/shlomif/progs/freecell/git/0fc-b/:/home/shlomif/progs/freecell/git/0fc-b//board_gen:/home/shlomif/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/neovim/bin:/home/shlomif/apps/fop/fop-20140425:/home/shlomif/apps/vim/bin:/home/shlomif/apps/golang/bin:/home/shlomif/.local/bin:/home/shlomif/.perl6/bin:/home/shlomif/.cargo/bin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/usr/games + export LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + python3 collect-stats.py 0fc-log.txt S 18474775 Int 617438 real 0m6.763s user 0m6.706s sys 0m0.057s ============ After: + PATH=/home/shlomif/apps/python3/bin:/home/shlomif/apps/fcs/bin:/home/shlomif/progs/freecell/git/0fc-b/:/home/shlomif/progs/freecell/git/0fc-b//board_gen:/home/shlomif/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/neovim/bin:/home/shlomif/apps/fop/fop-20140425:/home/shlomif/apps/vim/bin:/home/shlomif/apps/golang/bin:/home/shlomif/.local/bin:/home/shlomif/.perl6/bin:/home/shlomif/.cargo/bin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/usr/games + export LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + python3 collect-stats.py 0fc-log.txt S 18474775 Int 617438 real 0m6.651s user 0m6.595s sys 0m0.056s + PATH=/home/shlomif/apps/python3/bin:/home/shlomif/apps/fcs/bin:/home/shlomif/progs/freecell/git/0fc-b/:/home/shlomif/progs/freecell/git/0fc-b//board_gen:/home/shlomif/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/neovim/bin:/home/shlomif/apps/fop/fop-20140425:/home/shlomif/apps/vim/bin:/home/shlomif/apps/golang/bin:/home/shlomif/.local/bin:/home/shlomif/.perl6/bin:/home/shlomif/.cargo/bin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/usr/games + export LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + python3 collect-stats.py 0fc-log.txt S 18474775 Int 617438 real 0m6.625s user 0m6.559s sys 0m0.066s + PATH=/home/shlomif/apps/python3/bin:/home/shlomif/apps/fcs/bin:/home/shlomif/progs/freecell/git/0fc-b/:/home/shlomif/progs/freecell/git/0fc-b//board_gen:/home/shlomif/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/neovim/bin:/home/shlomif/apps/fop/fop-20140425:/home/shlomif/apps/vim/bin:/home/shlomif/apps/golang/bin:/home/shlomif/.local/bin:/home/shlomif/.perl6/bin:/home/shlomif/.cargo/bin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/usr/games + export LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + LD_LIBRARY_PATH=/home/shlomif/apps/python3/lib + python3 collect-stats.py 0fc-log.txt S 18474775 Int 617438 real 0m6.601s user 0m6.559s sys 0m0.042s ========= Based on https://github.com/shlomif/freecell-pro-0fc-deals . <!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. # Pull Request title It should be in the following format: ``` bpo-NNNN: Summary of the changes made ``` Where: bpo-NNNN refers to the issue number in the https://bugs.python.org. Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue. # Backport Pull Request title If this is a backport PR (PR made against branches other than `master`), please ensure that the PR title is in the following format: ``` [X.Y] <title from the original PR> (GH-NNNN) ``` Where: [X.Y] is the branch name, e.g. [3.6]. GH-NNNN refers to the PR number from `master`. --> ---------- components: IO messages: 346280 nosy: shlomif priority: normal pull_requests: 14130 severity: normal status: open title: Optimize and refactor readline(). type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37371> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com