boundary/folsom — pull request #44 by Vagabond (2012-12-10 22:14:48+00:00)
Title: Make spiral metric slightly faster

Try to avoid unnessary ETS calls, when possible:

If ets:update_counter succeeds (meaning we already have a row for this 'moment', we're done.

If it doesn't we try insert_new with a value of 1 (to avoid potentially having to increment_counter immediately afterwards), we're done.

If insert_new returns false (i.e. it failed, THEN we have to call update_counter).

This seems to be about 13% faster in my benchmarking.