https://github.com/snawoot/list
Improved version of "container/list" from Go stdlib
https://github.com/snawoot/list
doubly-linked-list freelist high-performance linked-list list
Last synced: over 1 year ago
JSON representation
Improved version of "container/list" from Go stdlib
- Host: GitHub
- URL: https://github.com/snawoot/list
- Owner: Snawoot
- License: bsd-3-clause
- Created: 2024-09-12T16:43:15.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T17:51:13.000Z (almost 2 years ago)
- Last Synced: 2025-01-26T06:11:15.286Z (over 1 year ago)
- Topics: doubly-linked-list, freelist, high-performance, linked-list, list
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# list
[](https://pkg.go.dev/github.com/Snawoot/list)
Improved version of "container/list" from Go stdlib:
* Uses generics instead of interface values.
* Uses own freelist allocator for list elements.
## Benchmarks
Benchmarks versus original "container/list".
```
goos: linux
goarch: amd64
pkg: github.com/Snawoot/list
cpu: Intel(R) N100
BenchmarkContainerList/PushFront-4 11407059 117.5 ns/op 55 B/op 1 allocs/op
BenchmarkContainerList/PushPopFront-4 10579866 131.4 ns/op 55 B/op 1 allocs/op
BenchmarkContainerList/PushPopFrontImmediate-4 13294423 91.07 ns/op 56 B/op 1 allocs/op
BenchmarkFreelistList/PushFront-4 29593803 43.41 ns/op 49 B/op 0 allocs/op
BenchmarkFreelistList/PushPopFront-4 28675177 42.61 ns/op 40 B/op 0 allocs/op
BenchmarkFreelistList/PushPopFrontImmediate-4 128021602 9.493 ns/op 0 B/op 0 allocs/op
BenchmarkFreelistList/WarmedUpPushFront-4 130466055 9.313 ns/op 0 B/op 0 allocs/op
BenchmarkFreelistList/WarmedUpPushPopFront-4 78485906 14.48 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/Snawoot/list 18.221s
```