Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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