Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/libsugar/bettercollections
Some better collection implementations than the system library
https://github.com/libsugar/bettercollections
arraypool collections concurrent data-structures vector
Last synced: about 1 month ago
JSON representation
Some better collection implementations than the system library
- Host: GitHub
- URL: https://github.com/libsugar/bettercollections
- Owner: libsugar
- License: mit
- Created: 2023-11-29T14:46:01.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-29T11:16:13.000Z (11 months ago)
- Last Synced: 2024-11-29T06:39:46.594Z (about 2 months ago)
- Topics: arraypool, collections, concurrent, data-structures, vector
- Language: C#
- Homepage: https://www.nuget.org/packages/BetterCollections/
- Size: 137 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BetterCollections
[![.NET](https://github.com/libsugar/BetterCollections/actions/workflows/dotnet.yml/badge.svg)](https://github.com/libsugar/BetterCollections/actions/workflows/dotnet.yml)
[![Nuget](https://img.shields.io/nuget/v/BetterCollections)](https://www.nuget.org/packages/BetterCollections/)
![MIT](https://img.shields.io/github/license/libsugar/BetterCollections)
[![ApiDoc](https://img.shields.io/badge/ApiDoc-222222?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAXCAYAAAAV1F8QAAAACXBIWXMAAAsSAAALEgHS3X78AAABpElEQVRIib2WQU7CUBCGfwh7dOdO8sc9uHMnJzC6N7Hu3KknsJzA3kC8AZ5AuEE5ABNMXLhE414zZJ4OpS1gin8C75U3ne9N5zHT2mQyiQC0sKghgC7KNQMwIDldYTdXwxxe5KzdrXH/vYiMAMQkh2WGdZIaUW+dXRXoGMCziCS6LCI7uSD9IhkDeCpw9A7gkGQtfADsAjgDMHJ21yLSBxCJyGkuyJQWgFKSC2skZyQ1P/rYL92SpmAPQF9Eok1BpSLZz8CuFATgwSJcAs3+AsIvLDz6JoCPEGGIrF58+8aK3Q0nAMY2jysFWR5f7LLtUrEvIp0qI1IV/XkrB3m9uXnrv0CVHoZSbRN04C+2Cfp082nVoI6NesyPbK61clAZyCpA0y4HVtVVidbGSkDWGhL306uNY+sMCznqIF+5/SUDGbpotLed2yP7aRceVOSwXQLpGiTYPFpx1leDrm/zDberqMRhag5S25A60tFvQiFaxW90XfPifTSsG6pBCL0sqpDgrG5JJiKigKXuqtK3oC87jr4gzltyxtZDgr2ertVvQgC+AfGSgtzXl3gYAAAAAElFTkSuQmCC)](https://libsugar.github.io/BetterCollections/)### WIP
- All containers optionally use ArrayPool
- Buffers
- `DirectAllocationArrayPool`
Pretend to have pooling
- `ArrayPoolFactory`
Factory abstraction provides array pool implementation
- Not Sync / Non Concurrent / No Thread Safe
- `Vec`
Reimplemented `List`, can unsafely retrieve the internal Array or as Span, Memory
*todo* methods same to `List`
- Sync / Concurrent / Thread safe
- `OnceInit`
Similar to `Lazy`, but provides init function when getting
Inspired by rust `OnceCell`
- Memories
- `Box` `ReadOnlyBox`
Simply wrap a value onto the heap
- `ArrayRef` `ReadOnlyArrayRef`
A **fat reference** *(`T[] + offset`)* that can be safely put on the **heap**, not a ref struct
- `MemoryRef` `ReadOnlyMemoryRef`
A **fat reference** *(`Memory + offset`)* that can be safely put on the **heap**, not a ref struct
- `OffsetRef` `ReadOnlyOffsetRef`
A **fat reference** *(`object + offset`)* that can be safely put on the **heap**, not a ref struct
- `MemoryEx`
- Provides `GetEnumerator` for `Memory` `ReadOnlyMemory`
- Cryptography
- `AHasher`
A hasher that ensures even distribution of each bit
If possible use Aes SIMD acceleration (.net7+)
Algorithm from https://github.com/tkaitchuck/aHash