Category Archives: c programming

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 … Continue reading

Posted in c programming, python programming | Tagged , , , | Leave a comment

Using a cmph as a Set

Given the extremely low overhead of the minimal perfect hashes generated by cmph (on the order of 1/2 a byte per key), I was fairly certain they would generate false positives. That is, if you searched for a key that … Continue reading

Posted in c programming | Tagged , , , , | Leave a comment

CMPH Benchmark Bar Chart

I added a little more code to the cmph-bench project in GitHub. It’s described in the previous post, cmph-bench – A Benchmark for Minimal Perfect Hashing in C. The bench mark program now randomizes the order of the keys before … Continue reading

Posted in c programming, python programming | Tagged , , | Leave a comment

cmph-bench – A Benchmark for Minimal Perfect Hashing in C

There is an open source software package on Sourceforge that includes implementations in C of several minimal perfect hashing algorithms. It has been uploaded to GitHub at https://github.com/zvelo/cmph. The code is licensed under your choice of LGPL (Lesser GNU Public … Continue reading

Posted in c programming | Tagged , , , , , , , | 1 Comment

essexeld: Open Source Domain/URL Block List Daemon

essexld is a simple, high performance service, written in C using the sxe event driven programming library, for serving information about domains and URLs over HTTP from Linux. It was built and tested on Mint/debian Linux. It doesn’t support multiple … Continue reading

Posted in c programming | Tagged , , , , , , , , | Leave a comment

OOPC (Object Oriented Programming in C) Conventions

Because C is not an object oriented programming language, if you want to use it for object oriented programming, you need to do it yourself. But how best to do this? Here are some of the conventions I prefer to … Continue reading

Posted in c programming | Tagged , , , , | Leave a comment

Debugging a Core with DDD

When something goes badly wrong in a C program, things generally go south in one of two ways: If the programmer has been careful, the program will detect that something is wrong and abort itself If the programmer was lazy … Continue reading

Posted in c programming, tools | Tagged , , , , , | Leave a comment