LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Unpopular Positions: One Geek's Take
User Name
Password

Notices


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

Expected topics include:
  • Technology
  • Politics
  • Defense
  • Philosophy
  • Humanism and Transhumanism
  • The Future
Old

Memory overhead of Python and Perl associative arrays

Posted 05-06-2014 at 06: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...
ttk
Senior Member
Posted in Uncategorized
Views 1187 Comments 0 ttk is offline

  



All times are GMT -5. The time now is 08:30 AM.

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