Skip to content

Fastest Zero Alloc LRU Cache for Golang (Go). Maximizes memory use, no garbage collection issues. Use memory size limit instead of specifying item capacity. Batch eviction feature for faster processing

License

Notifications You must be signed in to change notification settings

kolinfluence/gocache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Super Fast LRU Cache for Golang

" Let's Accelerate LRU " - Accelru

One of The Fastest Zero Allocation LRU Cache for Golang

(for key, value pairs in []byte)

Accelru (cxlrubytes)

Supposingly having the best cache hit ratio (in zero allocation class) with "optimum" memory usage.

Please contribute to make it better. Feedback / comments / suggestions on improvement appreciated (stars too).

Check lru/bytes for details for key, value in []byte (tested).

Check lru for Any type details (untested).

Motivation

Most current (year 2024) golang lru implementations are either not as fast as this, or needed capacity count of items as input parameter, this can result in "OOM" or not being able to fully utilize the memory capacity available.

cxlrubytes thus is designed for:

  1. High performance
  2. Zero allocation (so no garbage collection)
  3. Maximizing memory usage (but not being limited by item capacity)

Will do other input parameters in future but currently, converting everything to []byte and using this gives wonderful results.

About

Fastest Zero Alloc LRU Cache for Golang (Go). Maximizes memory use, no garbage collection issues. Use memory size limit instead of specifying item capacity. Batch eviction feature for faster processing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%