Skip to content

win32 np.clip slowness fixed in numpy#2125

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:drop_win32_npclip_workaround
Nov 28, 2021
Merged

win32 np.clip slowness fixed in numpy#2125
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:drop_win32_npclip_workaround

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Nov 27, 2021

#1641 added a workaround for np.clip slowness when running on Windows platform.

The cause was found and fixed in numpy/numpy#20134.
numpy/numpy#20234 is also relevant. (bump compiler to MSVC 2019).

The two above-mentioned PRs are included in numpy 1.22. Thus the workaround can and should be avoided when using numpy >= 1.22. Note that with numpy 1.22, np.clip now runs equally fast on both Windows and Linux (WSL2) on the same machine, as would be expected.

Note that the slowness was not a Windows platform issue, it was a code + compiler issue.
For testing the speed difference between different versions of numpy, the script in numpy/numpy#18673 can be used.
Numpy 1.22.0rc1 can currently be downloaded from pypi.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Nov 28, 2021

Thanks for sticking w/ this issue @pijyoi ! LGTM, merging!

@j9ac9k j9ac9k merged commit 70997ae into pyqtgraph:master Nov 28, 2021
@pijyoi pijyoi deleted the drop_win32_npclip_workaround branch November 28, 2021 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants