Re: [Python-Dev] User + sys time bigger than real time, in case of no real parallelism

2017-02-05 Thread Hans-Peter Jansen
On Sonntag, 5. Februar 2017 07:59:04 Marco Buttu wrote: > I am really sorry for the OT :-( I asked elsewhere but without any > answer :-( > I can not figure out why in this short example the user+sys time is > bigger than real time. The example executes the task() functions twice, > with each execu

Re: [Python-Dev] User + sys time bigger than real time, in case of no real parallelism

2017-02-05 Thread Stefan Ring
> That is usually what I can expect in case of tasks executed in parallel on > different CPUs. But my example should not be the case, due to the GIL. What > am I missing? Thank you very much, and sorry again for the OT :( With such finely intermingled thread activity, there might be a fair bit of

[Python-Dev] User + sys time bigger than real time, in case of no real parallelism

2017-02-04 Thread Marco Buttu
I am really sorry for the OT :-( I asked elsewhere but without any answer :-( I can not figure out why in this short example the user+sys time is bigger than real time. The example executes the task() functions twice, with each execution in a separate thread. The task() just increment 10**6 tim