O(n^2) is bad - can it be fixed?

Michael Hudson mwh at python.net
Tue May 22 13:31:54 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> writes:

> ...particularly given that cStringIO appears to be
> almost twice as fast again as the array.array('c')
> for this specific task... as per my followup post.

One of the reasons array.array often isn't especially quick is the
conversions that must take place every time something is put into or
accessed in the array.

Cheers,
M.

-- 
  You owe The Oracle a TV with an 'intelligence' control - I've 
  tried 'brightness' but that didn't work.
                                      -- Internet Oracularity #1192-01



More information about the Python-list mailing list