naive

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: Unlicense Imports: 3 Imported by: 0

Documentation

Overview

A way worse implementation of LRUMap, its only function is to be so obvious in its implementation that its behavior is self-evidently correct, allowing it to be used as a reference in tests.

Technically this is concurrency-safe so you could use this as an LRUMap, but set() is O(n) so... why would you. Also this one breaks after 2^64 calls to Set()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[K comparable, V any](capacity int) *naiveMap[K, V]

Create a new NaiveMap, with a given fixed capacity.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL