-
Notifications
You must be signed in to change notification settings - Fork 22
Description
One of the things I've learned about benchmarking search algorithms is you have to compare like with like. I see an earlier issue asking for the amount of memory used by each algorithm to be reported, and that would be very useful information to have.
I have been working on a very simple addition - a simple function that calculates how many entries can be safely used without going over a maximum memory limit, (often limited to a power of two for hash tables). I've modified a few algorithms to pick a hash table size enforcing the memory limit, and this gives much more interesting results when you know the algorithms are using roughly the same amount of memory as each other.
My technique isn't very pleasant to work with. You have to re-compile all the algorithms if you change the memory limit, as it's hard coded in memlimit.h. So I don't see this as a general PR anytime soon, but I am making use of it myself when comparing algorithms.
My purpose in raising the issue is to understand if this is something worth pursuing - would anyone else be interested in these capabilities?