Go Job Hunting at the LQ Job Marketplace
Go Back > Blogs > Unpopular Positions: One Geek's Take
User Name


A space to ponder, discuss, speculate, disagree, and learn.

Expected topics include:
  • Technology
  • Politics
  • Defense
  • Philosophy
  • Humanism and Transhumanism
  • The Future
Rate this Entry

Memory overhead of Python and Perl associative arrays

Posted 05-06-2014 at 07:51 PM by ttk

I've been measuring the relative memory overhead of perl hashes and python dicts (essentially the same data type, both associative arrays).

These measures are necessarily approximate, since they resize differently as the tables fill, but the overhead comes to about 57 bytes plus 76 bytes per element for perl, and 264 bytes plus 123 bytes per element for python. Both of these are for numeric-to-numeric mappings.

About halfway through this exercise, it occurred to me that I was "dict-sizing". ;-)
Posted in Uncategorized
Views 376 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 12:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration