I was looking at the non cryptographic hashing algorithms nested in the stdlib's "hash" pkg earlier and there are a few non crypto hashing algorithms I think should be added; namely xxhash32/64 and cityhash/farmhash.
And if this proposal is shot down, can we at least expose the hashing algorithm used in the runtime (the hash inspired by and modeled around the xxhash and cityhash algorithms) to clients via a new hashing pkg nested inside std's "hash" pkgpath directory?
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Feel free to extract the runtime's hash function into a separate package. I don't think it should live in the standard library, however. It would make a fine go-gettable package.
I don't want to expose the runtime's hashing package directly. It can and does vary from release to release and from architecture to architecture. We wouldn't want to expose clients to that.
On Wed, Apr 1, 2015 at 9:27 PM, Keith Randall <k...@google.com> wrote:Feel free to extract the runtime's hash function into a separate package. I don't think it should live in the standard library, however. It would make a fine go-gettable package.
Thats why I proposed a "hash" sub repo. Doesn't the rationality used to justify the creation and maintenance of 3rd party subrepos for stdlib pkgs like "crypto" and "image", also apply to the "hash" pkg as well?
I don't want to expose the runtime's hashing package directly. It can and does vary from release to release and from architecture to architecture. We wouldn't want to expose clients to that.The value in hash algorithms like xxhash, farmhash (the successor to cityhash) is that the algorithms are fast and robust enough to use during runtime in scenarios that requires the client to hash a lot of data and any collisions have to have their identity vetted at runtime too.
For example when implementing the diff utility it's optimal to strip, hash and sort all the lines of text contained within all the files being compared before you navigate through the string blobs looking for the graph that reveals the LCS. If a change to the underlying hashing algorithm changes the value that is output for a given input; that is totally fine because nobody should be using a non crypto hash to store important data to disk for later retrieval and re-usage anyways.
I was looking at the non cryptographic hashing algorithms nested in the stdlib's "hash" pkg earlier and there are a few non crypto hashing algorithms I think should be added; namely xxhash32/64 and cityhash/farmhash.
And if this proposal is shot down, can we at least expose the hashing algorithm used in the runtime (the hash inspired by and modeled around the xxhash and cityhash algorithms) to clients via a new hashing pkg nested inside std's "hash" pkgpath directory?
--