[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Nikita Kniazev
Nikita Kniazev added the comment: > I made a draft PR here: > > https://github.com/python/cpython/pull/30177 > > to fix the issue. But we should benchmark and evaluate it before deciding > anything. It seems that the PR was merged without discussion about 85% regression

[issue37794] Replace /Ox with /O2

2019-08-08 Thread Nikita Kniazev
Change by Nikita Kniazev : -- keywords: +patch pull_requests: +14910 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15179 ___ Python tracker <https://bugs.python.org/issu

[issue37794] Replace /Ox with /O2

2019-08-08 Thread Nikita Kniazev
New submission from Nikita Kniazev : The /O2 is a superset of /Ox with additional /GF and /Gy switches which enables strings and functions deduplication and almost always are favorable optimizations without downsides. https://docs.microsoft.com/en-us/cpp/build/reference/ox-full-optimization

[issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)`

2017-03-02 Thread Nikita Kniazev
Nikita Kniazev added the comment: > The purpose of the issue is unclear to me. I was asked to open an issue by Serhiy Storchaka on the GitHub PR. > Why do you want to replace while with for? For readability? Yes, I have open a PR just to improve the readability, because I was sur

[issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)`

2017-03-02 Thread Nikita Kniazev
New submission from Nikita Kniazev: I have failed to find previous discussion when `while (n--)` was changed to `n++; while (--n)`. (commits 306d6b1ea6bf2582b9284be2fd27275abbade3e1, 165eee214bc388eb588db33385ca49ddbb305565) It is clear for me that n++; while (--n) and for (; n; --n