blankensteiner commented on a change in pull request #48:
URL: https://github.com/apache/pulsar-dotpulsar/pull/48#discussion_r480117314



##########
File path: src/DotPulsar/Internal/Murmur3_32Hash.cs
##########
@@ -0,0 +1,103 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace DotPulsar.Internal
+{
+    using System.IO;
+    using System.Text;
+
+    /// <summary>
+    /// Implementation of the MurmurHash3 non-cryptographic hash function.
+    /// </summary>
+    public class Murmur3_32Hash

Review comment:
       I did a performance test of 
[MurmurHashImpl](https://www.nuget.org/packages/MurmurHash.Net/) and 
[HashDepotImpl](https://www.nuget.org/packages/HashDepot/) and this 
implementation and here's the result:
   
   |         Method |      Mean |     Error |    StdDev |  Gen 0 | Gen 1 | Gen 
2 | Allocated |
   |--------------- 
|----------:|----------:|----------:|-------:|------:|------:|----------:|
   | MurmurHashImpl | 77.551 ns | 0.2652 ns | 0.2481 ns | 0.0204 |     - |     
- |      64 B |
   |  HashDepotImpl |  6.353 ns | 0.0346 ns | 0.0289 ns |      - |     - |     
- |         - |
   |      ThisHash | 78.219 ns | 0.3800 ns | 0.3369 ns | 0.0739 |     - |     - 
|     232 B |
   
   So we might consider going with HashDepot :-)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to