On Thu, Mar 1, 2012 at 8:55 PM, Alec Taylor <alec.tayl...@gmail.com> wrote:
> What would you recommend I use to compare data-structures and
> algorithms on space and time? (runtime)

For the latter metric, one of the profiling modules:
http://docs.python.org/library/debug.html
I'd start with timeit and go from there:
http://docs.python.org/library/timeit.html

For the former metric, you can write your own memory use measurement
utility function on top of:
http://docs.python.org/library/sys.html#sys.getsizeof
Or there is doubtless some Unix tool(s) you could use to get a more
crude measure of the total memory used by the Python interpreter
process.

Cheers,
Chris
--
http://rebertia.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to