cmph Comparitive Graphs

I just enhanced cmph-bench/cmph-graph.py to allow graphing a single attribute across multiple minimal perfect hashing algorithms. The updated code is available in GitHub. For example, the following command generates a CSV of lookup times for four algorithms:

./cmph-graph.py -t chd chd-ph brz brz-ph

Here’s what the output looks like:

"algo", 0, 1000000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000,
"chd", 0, 771125, 1845753, 2877126, 3630860, 4724457, 6133570, 7256998, 9365072, 9743756, 10769506,
"chd-ph", 0, 750386, 1672261, 2516055, 3620473, 4914581, 6514058, 6985887, 8423580, 10685038, 10831800,
"brz", 0, 753254, 1756762, 2678971, 3530783, 5239339, 6505353, 7822440, 8512124, 10439278, 10784875,
"brz-ph", 0, 813923, 1816921, 2587742, 3700242, 4648037, 5710205, 7039408, 8217433, 9588468, 11932299,

Finally, here’s the graph:

cmph-lookup-times

There’s not a whole lot of difference between the algorithms, speed wise.

Advertisements

About jimbelton

I'm a software developer, and a writer of both fiction and non-fiction, and I blog about movies, books, and philosophy. My interest in religious philosophy and the search for the truth inspires much of my writing.
This entry was posted in c programming, python programming and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s