Inconsistent Python Performance on Windows

前端 未结 2 612
抹茶落季
抹茶落季 2021-01-22 12:05

I have some Python 2.7 code I\'m working on and it works great on any *nix type system. However, on windows the same section of code will have wildly different execution times.

2条回答
  •  生来不讨喜
    2021-01-22 12:23

    I don't see anything problematic. You have code that performs serial IO, which will block your process and possibly invoke the scheduler. If that happens, it will first give control to a different process and only when that one yield or exceeds its timeslice it will re-schedule your process.

    The question for you is: What is the size of the scheduler timeslice of the systems you are running? I believe that this will give you an insight into what is happening.

提交回复
热议问题