pitrou opened a new pull request #8716:
URL: https://github.com/apache/arrow/pull/8716


   Two cache implementations are provided:
   - a two-level random replacement cache
   - a LRU cache
   
   The LRU cache ends up 4 to 5 times faster than the 2-level RR cache.
   
   Benchmarks (arg 1: key size, arg 2: value size):
   ```
   RRCacheLookup/8/16             8593 ns         8592 ns        79226 
items_per_second=11.6386M/s
   RRCacheLookup/8/1024           8608 ns         8607 ns        78896 
items_per_second=11.6182M/s
   RRCacheLookup/64/16           11422 ns        11420 ns        60260 
items_per_second=8.75626M/s
   RRCacheLookup/64/1024         11477 ns        11475 ns        60242 
items_per_second=8.71453M/s
   LRUCacheLookup/8/16            1875 ns         1875 ns       367803 
items_per_second=53.3402M/s
   LRUCacheLookup/8/1024          1867 ns         1867 ns       371785 
items_per_second=53.567M/s
   LRUCacheLookup/64/16           2621 ns         2621 ns       264372 
items_per_second=38.1525M/s
   LRUCacheLookup/64/1024         2639 ns         2638 ns       259995 
items_per_second=37.9043M/s
   MemoizeLRUCached/8/16          5224 ns         5223 ns       133050 
items_per_second=19.1452M/s
   MemoizeLRUCached/8/1024        5847 ns         5846 ns       115158 
items_per_second=17.1043M/s
   MemoizeLRUCached/64/16         5800 ns         5799 ns       118064 
items_per_second=17.2432M/s
   MemoizeLRUCached/64/1024       6492 ns         6491 ns       103886 
items_per_second=15.4062M/s
   ```


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


Reply via email to