Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

mpeters (5802)

mpeters
  (email not shown publicly)
http://petersfamily.org/
AOL IM: michael00peters (Add Buddy, Send Message)

Technorati Profile [technorati.com]

Journal of mpeters (5802)

Thursday March 25, 2010
09:47 AM

Perl hashes in comparison to C, C++, Python and Ruby

[ #40268 ]
I just came across this blog post which benchmarks several hash implementations in C and C++ including the hashes or Python and Ruby.

I was wondering if someone wanted to fork the benchmarks on GitHub and add a Perl entry. I haven't done C in a while and I've never done XS, so I'm probably not the best person for that job.

Any volunteers?
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
    • Oh, hasn't appeared yet (moderation?). Below is the text of my comment. In a nutshell, for the cases benchmarked, perl is somewhat faster than python (and a lot faster than Ruby) and uses about as much memory as Ruby, which is somewhat less than Python.

      I did a quick-and-dirty implementation for Perl-hashes. Take the results with a grain of salt. I made a coding mistake with the deletion benchmark, so I didn't include it. I also skipped the integer benchmarks because Perl doesn't have an integer hashmap. You