How to make a foreign function run as fast as possible in Windows?

jfong at ms4.hinet.net jfong at ms4.hinet.net
Wed Sep 28 21:22:50 EDT 2016


Paul  Moore at 2016/9/28 11:31:50PM wrote:
> Taking a step back from the more detailed answers, would I be right to assume that you want to call this external function multiple times from Python, and each call could take days to run? Or is it that you have lots of calls to make and each one takes a small amount of time but the total time for all the calls is in days?
> 
> And furthermore, can I assume that the external function is *not* written to take advantage of multiple CPUs, so that if you call the function once, it's only using one of the CPUs you have? Is it fully utilising a single CPU, or is it actually not CPU-bound for a single call?
> 
> To give specific suggestions, we really need to know a bit more about your issue.

Forgive me, I didn't notice these detail will infulence the answer:-)

Python will call it once. The center part of this function was written in assembly for performance. During its execution, this part might be called thousands of million times. The function was written to run in a single CPU, but the problem it want to solve can be easily distributed into multiple CPUs.

--Jach



More information about the Python-list mailing list