KeyToHash possibly letting key interfaces escape to heap

Moved from GitHub ristretto/107

Posted by karlmcguire:

As brought up in the performance Gopher channel, since we’re using interface{} for keys, this call to keyToHash is probably letting the interface escape to heap.

Solution: switch over to string or []byte for public API calls.

martinmr commented :

@karlmcguire should the change be for keys or keys and values?

some of the issues are fixed by this PR: Improve memory performance by martinmr · Pull Request #195 · dgraph-io/ristretto · GitHub