[Python-Dev] Re: FIFO data structure?
Sun, 20 Apr 2003 18:21:02 -0400
-----BEGIN PGP SIGNED MESSAGE-----
On Sunday 20 April 2003 04:54 pm, Guido van Rossum wrote:
> Also ask yourself the following questions. How much time are you
> paying for the overhead of using a class vs. using a list directly?
I imagine the object would eventually be written in C (probably by someone
more experienced than myself, but I could do it if need be), when that
overhead shouldn't matter. But even with a pure-Python implementation, as
noted in my other email, the fastest O(1) implementation outran the naive
list implementation (granted it was wrapped in a class to maintain the same
interface) somewhere between 100 and 1000 elements. I could find out the
average place at which the O(1) implementation becomes faster, if you're
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)
-----END PGP SIGNATURE-----