You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/09/06 21:57:24 UTC

[GitHub] [incubator-pinot] jackjlli commented on issue #4568: Replace Hashmap to Object2IntOpenHashMap in OnHeapStringDictionary

jackjlli commented on issue #4568: Replace Hashmap to Object2IntOpenHashMap in OnHeapStringDictionary
URL: https://github.com/apache/incubator-pinot/pull/4568#issuecomment-529028012
 
 
   I've updated the test and here are the results comparing `Object2IntOpenHashMap` with `HashMap`.
   
   `Object2IntOpenHashMap`:
   ```
   Total time for building segment: 22239
   Total time for 10000000 lookups: 1876ms
   Memory usage: 2168980704
   DictSize,TimeTaken(ms),SegmentSize,NumLookups,Min,Max,Mean,StdDev,Median,Skewness,Kurtosis,Variance,BufferSize
   2000000,1876,1029251120,10000000,1000.0,1000.0,1000.0,0.0,1000.0,NaN,NaN,0.0
   ```
   ```
   Total time for building segment: 22667
   Total time for 10000000 lookups: 1901ms
   Memory usage: 2168993176
   DictSize,TimeTaken(ms),SegmentSize,NumLookups,Min,Max,Mean,StdDev,Median,Skewness,Kurtosis,Variance,BufferSize
   2000000,1901,1029251120,10000000,1000.0,1000.0,1000.0,0.0,1000.0,NaN,NaN,0.0
   ```
   ```
   Total time for building segment: 22174
   Total time for 10000000 lookups: 1880ms
   Memory usage: 2168980824
   DictSize,TimeTaken(ms),SegmentSize,NumLookups,Min,Max,Mean,StdDev,Median,Skewness,Kurtosis,Variance,BufferSize
   2000000,1880,1029251120,10000000,1000.0,1000.0,1000.0,0.0,1000.0,NaN,NaN,0.0
   ```
   
   `HashMap`:
   ```
   Total time for building segment: 22343
   Total time for 10000000 lookups: 2294ms
   Memory usage: 2248214504
   DictSize,TimeTaken(ms),SegmentSize,NumLookups,Min,Max,Mean,StdDev,Median,Skewness,Kurtosis,Variance,BufferSize
   2000000,2294,1029251120,10000000,1000.0,1000.0,1000.0,0.0,1000.0,NaN,NaN,0.0
   ```
   ```
   Total time for building segment: 24396
   Total time for 10000000 lookups: 2244ms
   Memory usage: 2248201544
   DictSize,TimeTaken(ms),SegmentSize,NumLookups,Min,Max,Mean,StdDev,Median,Skewness,Kurtosis,Variance,BufferSize
   2000000,2244,1029251120,10000000,1000.0,1000.0,1000.0,0.0,1000.0,NaN,NaN,0.0
   ```
   ```
   Total time for building segment: 23854
   Total time for 10000000 lookups: 2216ms
   Memory usage: 2248211648
   DictSize,TimeTaken(ms),SegmentSize,NumLookups,Min,Max,Mean,StdDev,Median,Skewness,Kurtosis,Variance,BufferSize
   2000000,2216,1029251120,10000000,1000.0,1000.0,1000.0,0.0,1000.0,NaN,NaN,0.0
   ```
   As shown above, `Object2IntOpenHashMap` uses less memory and it takes less time on lookups.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org