[Mesa-dev] [PATCH 06/26] python: Better iterate over dictionaries

Mathieu Bridon bochecha at daitauha.fr
Fri Jul 6 08:41:37 UTC 2018

On Thu, 2018-07-05 at 08:48 -0700, Dylan Baker wrote:
> I've asked a couple of people who have (in the past at least) had a
> hard requirement on python 2.x if moving to 3.x will be okay for
> them. If it's not then we may need to do something else here. I've
> used six in the past (although I know a lot of other pythonistas
> don't like six), so that would be an option I think.
> While this works fine, it's going to create a lot of overhead for
> anyone using python 2, since some of these data structures are huge,
> and returning a copy (or copy of a copy) is going to be fairly
> expensive. If we can drop python 2 support that of course isn't a
> problem.

I tested the scripts with Python 2 as well, and they didn't seem to
take significantly more time to complete. (I didn't look at memory
consumption though, which is a bit hard for scripts running so fast)

Are some of those platforms that require Python 2 very low-performance
ones, where it would have an actual impact?

I have a very slow ARM machine handy, I can try and see whether the
patches make a big difference there if it helps?

> Assuming that those people are okay with python 3,

If everyone is ok moving fully to Python 3, then the patch series could
be quite different and simpler. ^_^


More information about the mesa-dev mailing list