fixes CACHE_LENGTH type
speeds up hashing
prints nicer error message
fixes some confusing API
adds perf make target for Linux buildin perf tool