Visit the LQ Articles and Editorials section
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

Memory overhead of Python and Perl associative arrays

Posted 05-06-2014 at 07:51 PM by ttk (Unpopular Positions: One Geek's Take)

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...
Posted in Uncategorized
Views 372 Comments 0 ttk is offline


All times are GMT -5. The time now is 11:00 AM.

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