Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisation needed on Python 2 (dictionary iterators) #10

Closed
GoogleCodeExporter opened this issue Aug 4, 2015 · 3 comments
Closed

Comments

@GoogleCodeExporter
Copy link

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.


Original issue reported on code.google.com by pde@n-side.com on 7 Mar 2015 at 5:42

@GoogleCodeExporter
Copy link
Author

Fixed in Lea 2.1.0

Original comment by pde@n-side.com on 7 Mar 2015 at 7:25

@GoogleCodeExporter
Copy link
Author

Original comment by pde@n-side.com on 7 Mar 2015 at 7:26

  • Changed state: Verified

@GoogleCodeExporter
Copy link
Author

Original comment by pde@n-side.com on 17 Jul 2015 at 1:02

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant