Optimisation needed on Python 2 (dictionary iterators)

Issue #10 closed
Former user created an issue

Originally reported on Google Code with ID 10

The Lea code contains several loops on dictionaries that use items() or values() methods.
OK, this allows for the same implementation on Python 2 and 3, which is handy. However,
this is inefficient on Python 2 because these methods build lists instead of iterators;
there are penalties on speed and memory. In Python 2, the right methods to call are
iteritems() and itervalues(). Note that these methods were present in the fist versions
of Lea, before porting to Python 3. It would be nice if Lea uses the most efficient
methods depending on the Python version on which it runs.

Reported by pde@n-side.com on 2015-03-07 17:42:50

Comments (4)

  1. Former user Account Deleted

    Reported by pde@n-side.com on 2015-07-17 13:02:11 - Labels added: Type-Enhancement - Labels removed: Type-Defect

  2. Log in to comment