21st August 2006, 1 min read Efficient FIFO/Queue data structure in Python 2 thoughts on “Efficient FIFO/Queue data structure in Python” b says: September 9, 2006 at 9:28 am Weird, I got the following numbers: >>> execfile(‘de.py’) 8.79299998283 7.91100001335 9.47399997711 Lists are worse but not that much worse. They might have improved performance of lists, I’m running 2.4.3. b says: September 10, 2006 at 7:34 am I reran the tests with this code and differencese are indeed massive: >>> execfile(‘de2.py’) “” 0.911000013351 “” 0.790999889374 “” 2.06299996376 Increasing iterations of each loop 10 times: >>> execfile(‘de2.py’) “” 8.94199991226 “” 8.04200005531 “” 136.887000084
Weird, I got the following numbers:
>>> execfile(‘de.py’)
8.79299998283
7.91100001335
9.47399997711
Lists are worse but not that much worse. They might have improved performance of lists, I’m running 2.4.3.
I reran the tests with this code and differencese are indeed massive:
>>> execfile(‘de2.py’)
“”
0.911000013351
“”
0.790999889374
“”
2.06299996376
Increasing iterations of each loop 10 times:
>>> execfile(‘de2.py’)
“”
8.94199991226
“”
8.04200005531
“”
136.887000084