| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

TuningTricks

Page history last edited by PBworks 15 years, 8 months ago

from email list optimizing histogram of numbers in huge file

 

- wrap your code in a function. Functions run much faster in python than module level code,

- look into using collections.defaultdict for histogram. A dictionary is a very appropriate way to store this data. numpy is good for processing numeric data once they are already in arrays, not for populating them.

 

Both Python "array.array" and "list" are implemented as dyn arrays, not as C-like linked lists.

Comments (0)

You don't have permission to comment on this page.