[Python-ideas] crazy ideas
Aaron Brady
castironpi at comcast.net
Wed May 23 17:04:23 CEST 2007
> -----Original Message-----
> From: python-ideas-bounces at python.org [mailto:python-ideas-
> bounces at python.org] On Behalf Of Ian D. Bollinger
> Sent: Tuesday, May 22, 2007 4:38 PM
>
> Josiah Carlson wrote:
> > "Ian D. Bollinger" <ian.bollinger at gmail.com> wrote:
> >
> >> But what about all the memory overhead of constructing the list
> argument?!
> >> (I turn off my car radio to save gas.)
> >>
> > If you really want to prove it to yourself that it doesn't matter, try
> > benchmarking the difference between...
> >
> > d = deque(())
> > d = deque([])
> >
> > d = deque((1,2,3,4,5,6,7,8,9,10))
> > d = deque([1,2,3,4,5,6,7,8,9,10])
> >
> >
> Er, I was trying to be ironic, hence the comment about gas mileage. :(
>
> - Ian D. Bollinger
Point very well taken. Gas mileage extrapolates to two things here.
Running time and coding-time[1] "miles" per backend dev-time and
clutter-time. Even if it's free, it's still free clutter. Guido's
demonstrating efficiency pretty advisedly.
[1] How expensive is it, per instance and in total, to write deque([a,b,c])
instead of d<a,b,c>?
More information about the Python-ideas
mailing list