[Python-Dev] futures API
Scott Dial
scott+python-dev at scottdial.com
Sat Dec 11 17:17:30 CET 2010
On 12/11/2010 9:44 AM, Thomas Nagy wrote:
> The amount of work items processed by unit of time does not seem to be a straight line: http://www.freehackers.org/~tnagy/runtime_futures_2.png . Out of curiosity, what is the "_thread_references" for?
>
> The source file for the example is in:
> http://www.freehackers.org/~tnagy/futures_test3.py
>
> The diagram was created by:
> http://www.freehackers.org/~tnagy/futures_test3.plot
You're test code does 50,000,000 of list appends. I suspect your
benchmark is telling you more about the behavior of large lists than the
overhead of the futures module. You should retry that experiment with
the list pre-allocated. Beyond that, the curve in that line is not
exactly a large amount of variance from a straight line.
--
Scott Dial
scott at scottdial.com
scodial at cs.indiana.edu
More information about the Python-Dev
mailing list