gianm opened a new pull request #127:
URL: https://github.com/apache/datasketches-memory/pull/127


   It is faster by 3–10x, at least on my machine (an Intel MacBook Pro). Some 
benchmarks comparing `clear()` vs `fill(0)` after this patch:
   
   ```
   Benchmark              (numBytes)  (where)  Mode  Cnt    Score   Error  Units
   MemoryBenchmark.clear           4  offheap  avgt   15     10.706 ±    0.166  
ns/op
   MemoryBenchmark.clear          16  offheap  avgt   15     11.031 ±    0.552  
ns/op
   MemoryBenchmark.clear          64  offheap  avgt   15     10.572 ±    0.162  
ns/op
   MemoryBenchmark.clear         256  offheap  avgt   15     11.539 ±    0.081  
ns/op
   MemoryBenchmark.clear        1024  offheap  avgt   15     17.520 ±    0.067  
ns/op
   MemoryBenchmark.clear        1025  offheap  avgt   15     30.936 ±    0.537  
ns/op
   MemoryBenchmark.clear        4096  offheap  avgt   15     73.675 ±    1.968  
ns/op
   MemoryBenchmark.clear       16384  offheap  avgt   15    298.331 ±    5.742  
ns/op
   MemoryBenchmark.clear       65536  offheap  avgt   15   1456.163 ±   51.568  
ns/op
   MemoryBenchmark.clear      262144  offheap  avgt   15   7050.704 ±  268.609  
ns/op
   MemoryBenchmark.fill            4  offheap  avgt   15    117.083 ±    0.723  
ns/op
   MemoryBenchmark.fill           16  offheap  avgt   15    117.528 ±    1.009  
ns/op
   MemoryBenchmark.fill           64  offheap  avgt   15    121.382 ±    2.037  
ns/op
   MemoryBenchmark.fill          256  offheap  avgt   15    131.476 ±    1.351  
ns/op
   MemoryBenchmark.fill         1024  offheap  avgt   15    182.377 ±    1.232  
ns/op
   MemoryBenchmark.fill         1025  offheap  avgt   15    145.153 ±    2.790  
ns/op
   MemoryBenchmark.fill         4096  offheap  avgt   15    363.053 ±    2.628  
ns/op
   MemoryBenchmark.fill        16384  offheap  avgt   15   1205.843 ±   47.600  
ns/op
   MemoryBenchmark.fill        65536  offheap  avgt   15   4513.897 ±  182.637  
ns/op
   MemoryBenchmark.fill       262144  offheap  avgt   15  17750.584 ± 1029.368  
ns/op
   ```


-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to