Conversation
If we did not get a single match, assume that the data cannot be entropy compressed. It is very likely that the data is random, and in the rare case it is not, we can live with it. Before: ``` BenchmarkRandomEncodeAllFastest-12 100 10475190 ns/op 1001.01 MB/s 0 B/op 0 allocs/op BenchmarkRandomEncodeAllDefault-12 100 11075653 ns/op 946.74 MB/s 0 B/op 0 allocs/op BenchmarkRandomEncoderFastest-12 200 8126950 ns/op 1290.25 MB/s 139 B/op 2 allocs/op BenchmarkRandomEncoderDefault-12 200 8059989 ns/op 1300.96 MB/s 90 B/op 2 allocs/op ``` After: ``` BenchmarkRandomEncodeAllFastest-12 300 4425967 ns/op 2369.15 MB/s 0 B/op 0 allocs/op BenchmarkRandomEncodeAllDefault-12 300 5108791 ns/op 2052.49 MB/s 0 B/op 0 allocs/op BenchmarkRandomEncoderFastest-12 300 5085627 ns/op 2061.84 MB/s 89 B/op 2 allocs/op BenchmarkRandomEncoderDefault-12 300 5947031 ns/op 1763.19 MB/s 65 B/op 2 allocs/op ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If we did not get a single match, assume that the data cannot be entropy compressed.
It is very likely that the data is random, and in the rare case it is not, we can live with it.
Before:
After: