I have ryzen 9 7950x3d and two system in dual boot:
- Ubuntu 22.04.3 LTS
- Windows 11
I have a task in python that is CPU intesive (multi thread)
When I run it with pypy3 it takes approximately:
- Ubuntu: 9387 seconds.
- Windows 11: 8275 seconds.
Ubuntu run more than 15 min longer.
Why? Where can be issue? Thank for help.
It is hard to tell for sure without having access to the code that is being executed. What I can tell, is that
pypy3itself may be compiled for different CPU instruction sets, which may affect performance. The same goes for all the libraries you may use. Typically, different pre-compiled binaries are provided on PyPi (defaultpiprepository) for libraries such asnumpyortorch. Just likepypy3, those libraries may use different instruction sets. Apart from that, Linux, FreeBSD, and Windows are very different OS and the performance of very low-level function may significantly vary. Typically, I do not expect I/O write/read access to the hard drive to yield the same performance for all OSes (not to mention IO-uring on Linux). It may also be affected by the type of filesystem that is being used. Finally, the drivers are not the same and behave differently (typically for display/GPU applications).