Re: Function Memory Usage

2008-11-01 Thread Steven D'Aprano
On Sat, 01 Nov 2008 01:43:44 -0400, Terry Reedy wrote: > Paulo J. Matos wrote: >> Hi all, >> >> What's the best way to know the amount of memory allocated by a >> function > > What do you count? > > def zeros(n): return [0]*n > > how much memory is that? I assume you don't include the memory

Re: Function Memory Usage

2008-11-01 Thread Lie Ryan
On Fri, 31 Oct 2008 18:41:58 +, Paulo J. Matos wrote: > Hi all, > > What's the best way to know the amount of memory allocated by a function > and the time it took to run? While the latter is simple to implement > using a wrapper function, the former is striking me as something that > needs t

Re: Function Memory Usage

2008-10-31 Thread Terry Reedy
Paulo J. Matos wrote: Hi all, What's the best way to know the amount of memory allocated by a function What do you count? def zeros(n): return [0]*n how much memory is that? -- http://mail.python.org/mailman/listinfo/python-list

Function Memory Usage

2008-10-31 Thread Paulo J. Matos
Hi all, What's the best way to know the amount of memory allocated by a function and the time it took to run? While the latter is simple to implement using a wrapper function, the former is striking me as something that needs to be primitive to python. Any tips? Cheers, -- Paulo Jorge Matos - p