A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/commercialhaskell/stack/issues/3006 below:

Speed up Store instances for (Byte)Strings of known size · Issue #3006 · commercialhaskell/stack · GitHub

Stack.Types.BuildPlan.GitSHA1 currently derives its Store instance from the underlying ByteString, so store must assume a variable size. A handwritten instance could use the fact that a SHA1 digest has 20 bytes and would probably be a bit faster, and – depending on architecture – 4 or 8 bytes shorter.

The same could be done for Stack.Types.PackageIndex.PackageDownload.pdSHA256 and probably other types.

If there isn't already a set of helpers for ByteStrings of known size in store, maybe it should be added! :)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4