On Sep 13, 2016 10:42 PM, "Kevin Benton" wrote:
>
> >All performance matters. All memory consumption matters. Being wasteful
over a purely aesthetic few extra characters of code is silly.
>
> Isn't the logical conclusion of this to write everything in a different
language? :)
On 09/13/2016 08:23 PM, Terry Wilson wrote:
On Tue, Sep 13, 2016 at 6:31 PM, Jay Pipes wrote:
On 09/13/2016 01:40 PM, Terry Wilson wrote:
On Thu, Jun 11, 2015 at 8:33 AM, Sean Dague wrote:
On 06/11/2015 09:02 AM, Jay Pipes wrote:
On 06/11/2015 01:16
>All performance matters. All memory consumption matters. Being wasteful
over a purely aesthetic few extra characters of code is silly.
Isn't the logical conclusion of this to write everything in a different
language? :)
On Tue, Sep 13, 2016 at 8:42 AM, Terry Wilson wrote:
On Tue, Sep 13, 2016 at 6:31 PM, Jay Pipes wrote:
> On 09/13/2016 01:40 PM, Terry Wilson wrote:
>>
>> On Thu, Jun 11, 2015 at 8:33 AM, Sean Dague wrote:
>>>
>>> On 06/11/2015 09:02 AM, Jay Pipes wrote:
On 06/11/2015 01:16 AM, Robert Collins wrote:
On 09/13/2016 01:40 PM, Terry Wilson wrote:
On Thu, Jun 11, 2015 at 8:33 AM, Sean Dague wrote:
On 06/11/2015 09:02 AM, Jay Pipes wrote:
On 06/11/2015 01:16 AM, Robert Collins wrote:
But again - where in OpenStack does this matter the slightest?
Precisely. I can't think of a
On Thu, Jun 11, 2015 at 8:33 AM, Sean Dague wrote:
> On 06/11/2015 09:02 AM, Jay Pipes wrote:
>> On 06/11/2015 01:16 AM, Robert Collins wrote:
>>> But again - where in OpenStack does this matter the slightest?
>>
>> Precisely. I can't think of a single case where we are iterating
On Sep 13, 2016, at 10:42 AM, Terry Wilson wrote:
> All performance matters. All
> memory consumption matters. Being wasteful over a purely aesthetic few
> extra characters of code is silly.
import this
-- Ed Leafe
On Wed, Jun 10, 2015 at 4:41 AM, Robert Collins
wrote:
> On 10 June 2015 at 21:30, Ihar Hrachyshka wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> On 06/10/2015 02:15 AM, Robert Collins wrote:
>>> I'm very glad folk are working
On 12 June 2015 at 05:39, Dolph Mathews dolph.math...@gmail.com wrote:
On Thu, Jun 11, 2015 at 12:34 AM, Robert Collins robe...@robertcollins.net
wrote:
On 11 June 2015 at 17:16, Robert Collins robe...@robertcollins.net
wrote:
This test conflates setup and execution. Better like my
] [all][python3] use of six.iteritems()
On 11 June 2015 at 17:16, Robert Collins robe...@robertcollins.net wrote:
This test conflates setup and execution. Better like my example,
...
Just had it pointed out to me that I've let my inner asshole out again
- sorry. I'm going to step away from
...@robertcollins.net
To: openstack-dev@lists.openstack.org
mailto:openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [all][python3] use of six.iteritems()
On 10 June 2015 at 17:22, gordon chung g...@live.ca
mailto:g...@live.ca wrote:
maybe the suggestion
it is just me, or are these differences pretty negligible considering
this is the 1 million item dictionary, which in itself is a unicorn
in openstack code or really most code anywhere?
as was stated before, if we have million-item dictionaries floating
around, that code has problems. I
Hi,
Le 10/06/2015 02:15, Robert Collins a écrit :
python2.7 -m timeit -s 'd=dict(enumerate(range(100)))' 'for i in
d.items(): pass'
10 loops, best of 3: 76.6 msec per loop
python2.7 -m timeit -s 'd=dict(enumerate(range(100)))' 'for i in
d.iteritems(): pass'
100 loops, best of 3: 22.6
On 06/11/2015 01:16 AM, Robert Collins wrote:
But again - where in OpenStack does this matter the slightest?
Precisely. I can't think of a single case where we are iterating over
anywhere near the number of dictionary items that we would see any
impact whatsoever.
Best,
-jay
On 06/11/2015 09:02 AM, Jay Pipes wrote:
On 06/11/2015 01:16 AM, Robert Collins wrote:
But again - where in OpenStack does this matter the slightest?
Precisely. I can't think of a single case where we are iterating over
anywhere near the number of dictionary items that we would see any
On Thu, Jun 11, 2015 at 12:34 AM, Robert Collins robe...@robertcollins.net
wrote:
On 11 June 2015 at 17:16, Robert Collins robe...@robertcollins.net
wrote:
This test conflates setup and execution. Better like my example,
...
Just had it pointed out to me that I've let my inner asshole out
On 6/11/15 1:39 PM, Dolph Mathews wrote:
On Thu, Jun 11, 2015 at 12:34 AM, Robert Collins
robe...@robertcollins.net mailto:robe...@robertcollins.net wrote:
On 11 June 2015 at 17:16, Robert Collins
robe...@robertcollins.net mailto:robe...@robertcollins.net wrote:
This test
+1 : .items()
Why can't we just add six.iteritems calls case by case basis (if that
happens)? Regex substitutions for a library call don't make sense to me
on such a massive scale.
On 6/11/15 11:00 AM, Victor Stinner wrote:
Hi,
Le 10/06/2015 02:15, Robert Collins a écrit :
python2.7 -m
On 06/11/2015 01:46 PM, Mike Bayer wrote:
I am firmly in the let's use items() camp. A 100 ms difference for
a totally not-real-world case of a dictionary 1M items in size is no
kind of rationale for the Openstack project - if someone has a
dictionary that's 1M objects in size, or even 100K,
Top posting as this is more a response to the whole thread.
My take aways from the most excellent discussion:
* There is some benefit to iteritems in python2 when you need it.
* OpenStack does not seem to need it
- Except in places that are operating on tens of thousands of large
objects
On 6/11/15 2:45 PM, John Dennis wrote:
On 06/11/2015 01:46 PM, Mike Bayer wrote:
I am firmly in the let's use items() camp. A 100 ms difference for
a totally not-real-world case of a dictionary 1M items in size is no
kind of rationale for the Openstack project - if someone has a
dictionary
On 06/09/2015 08:15 PM, Robert Collins wrote:
I'm very glad folk are working on Python3 ports.
I'd like to call attention to one little wart in that process: I get
the feeling that folk are applying a massive regex to find things like
d.iteritems() and convert that to six.iteritems(d).
On 10 June 2015 at 21:30, Ihar Hrachyshka ihrac...@redhat.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On 06/10/2015 02:15 AM, Robert Collins wrote:
I'm very glad folk are working on Python3 ports.
I'd like to call attention to one little wart in that process: I
get the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On 06/10/2015 02:15 AM, Robert Collins wrote:
I'm very glad folk are working on Python3 ports.
I'd like to call attention to one little wart in that process: I
get the feeling that folk are applying a massive regex to find
things like
On 10 June 2015 at 17:22, gordon chung g...@live.ca wrote:
maybe the suggestion should be don't blindly apply six.iteritems or items
rather than don't apply iteritems at all. admittedly, it's a massive eyesore,
but it's a very real use case that some projects deal with large data results
Date: Wed, 10 Jun 2015 21:33:44 +1200
From: robe...@robertcollins.net
To: openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [all][python3] use of six.iteritems()
On 10 June 2015 at 17:22, gordon chung g...@live.ca wrote:
maybe the suggestion should be don't blindly apply
On 11 June 2015 at 17:16, Robert Collins robe...@robertcollins.net wrote:
This test conflates setup and execution. Better like my example,
...
Just had it pointed out to me that I've let my inner asshole out again
- sorry. I'm going to step away from the thread for a bit; my personal
state
On 11 June 2015 at 15:48, Dolph Mathews dolph.math...@gmail.com wrote:
tl;dr .iteritems() is faster and more memory efficient than .items() in
python2
Using xrange() in python2 instead of range() because it's more memory
efficient and consistent between python 2 and 3...
# xrange() +
...@live.ca wrote:
Date: Wed, 10 Jun 2015 21:33:44 +1200
From: robe...@robertcollins.net
To: openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [all][python3] use of six.iteritems()
On 10 June 2015 at 17:22, gordon chung g...@live.ca wrote:
maybe the suggestion should
I'm very glad folk are working on Python3 ports.
I'd like to call attention to one little wart in that process: I get
the feeling that folk are applying a massive regex to find things like
d.iteritems() and convert that to six.iteritems(d).
I'd very much prefer that such a regex approach move
On 06/09/2015 08:15 PM, Robert Collins wrote:
I'm very glad folk are working on Python3 ports.
I'd like to call attention to one little wart in that process: I get
the feeling that folk are applying a massive regex to find things like
d.iteritems() and convert that to six.iteritems(d).
I'd
+1
Don't forget values and keys in addition to items. They aren't as common
but come up every so often. I think you can iterate the keys just by
iterating on the dict itself.
Carl
On Jun 9, 2015 6:18 PM, Robert Collins robe...@robertcollins.net wrote:
I'm very glad folk are working on
Huge +1 both for the suggestion and for reasoning.
It's better to avoid substituting language features by a library.
Eugene.
On Tue, Jun 9, 2015 at 5:15 PM, Robert Collins robe...@robertcollins.net
wrote:
I'm very glad folk are working on Python3 ports.
I'd like to call attention to one
py2 to py3
cheers,
gord
Date: Wed, 10 Jun 2015 12:15:33 +1200
From: robe...@robertcollins.net
To: openstack-dev@lists.openstack.org
Subject: [openstack-dev] [all][python3] use of six.iteritems()
I'm very glad folk are working on Python3 ports.
I'd
34 matches
Mail list logo