proost opened a new pull request, #71: URL: https://github.com/apache/datasketches-go/pull/71
Go vs Java benchmark: https://github.com/apache/datasketches-characterization/pull/89 code: ```go func BenchmarkHashAndScreen(b *testing.B) { b.Run("most hashes passes", func(b *testing.B) { ht := NewHashtable(10, 10, ResizeX2, 1.0, MaxTheta, DefaultSeed, true) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { _, _ = ht.HashInt64AndScreen(int64(i)) } }) b.Run("hashes exceed theta", func(b *testing.B) { ht := NewHashtable(10, 10, ResizeX2, 0.001, 1000, DefaultSeed, true) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { _, _ = ht.HashInt64AndScreen(int64(i)) } }) } ``` * current code performance: ``` goos: darwin goarch: arm64 pkg: github.com/apache/datasketches-go/theta cpu: Apple M1 Pro BenchmarkHashAndScreen BenchmarkHashAndScreen/most_hashes_passes BenchmarkHashAndScreen/most_hashes_passes-10 240147729 5.022 ns/op 0 B/op 0 allocs/op BenchmarkHashAndScreen/hashes_exceed_theta BenchmarkHashAndScreen/hashes_exceed_theta-10 9001977 132.9 ns/op 96 B/op 4 allocs/op ``` * changed: ``` goos: darwin goarch: arm64 pkg: github.com/apache/datasketches-go/theta cpu: Apple M1 Pro BenchmarkHashAndScreen BenchmarkHashAndScreen/most_hashes_passes BenchmarkHashAndScreen/most_hashes_passes-10 241465656 4.943 ns/op 0 B/op 0 allocs/op BenchmarkHashAndScreen/hashes_exceed_theta BenchmarkHashAndScreen/hashes_exceed_theta-10 246932887 4.860 ns/op 0 B/op 0 allocs/op ``` Sorry for not considering performance in hot path when i wrote code and Thank you for accepting breaking change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
