Comments (4)
@netcorefan1 Hi, could you share the Program.cs and csproj through the gist and not through the zip archive?
Also, I am not sure what is the MemoryOwner you are talking about - is it the ArrayPool wrapper?
Then how it can be used as a map?
from imtools.
@netcorefan1 Hi, could you share the Program.cs and csproj through the gist and not through the zip archive?
Many thanks for your support. Gist link
Also, I am not sure what is the MemoryOwner you are talking about - is it the ArrayPool wrapper?
Yes, it is the ArrayPool wrapper made by the community toolkit.
Then how it can be used as a map?
This is something that I really don't have any idea (I don't have the required low level knowledge). It is very uncommon, but someone seems to have done something similar with good results.
I have excluded such possibility from the beginning and rather I focused on trying to understand what between the two options could provide faster data access with less resources. There are also other operations which will probably work better with a map, but I'm at the beginning and so I can't do any estimation. So I decided to first focus on performance and check if I have done something wrong for getting so poor performance.
from imtools.
I have added the benchmark.
You are comparing different things here:
MemoryOwner.Span
is the pre-allocated Array,ImHashMap
is the Map/Dictionary- Moreover,
ImHashMap
is the immutable map (e.g. targeting the thread safety scenarios, non-locking, etc.), and making them faster and less memory consuming than the Immutable collections from the BCL.
Next version of ImTools will provide non thread safe map but faster and lighter, called SmallMap
which beats the BCL Dictionary
(but not the arrays).
from imtools.
closing
from imtools.
Related Issues (20)
- Try out 2-3-4 tree HOT 4
- Remove ImMap V1 from the benchmarks in readme and add ImMap234
- Add ImHashMap23 on par with ImMap23
- Add ImMap.GetSurePresentValue method
- Replace the ImMap methods with Update delegate parameter with composable Add and Update methods
- Add a builder-like capability to the ImHashMap via BuildFromDifferent methods HOT 2
- Add the ImHashMap creation methods to accept the array of items and immediately build the final form of the map HOT 1
- Implement native ToJson and fromJson for maps HOT 1
- the Im(Hash)Map.Entry methods should return the entry type but now return the map type HOT 1
- Document Im(Hash)Map implementation quirks and tricks for the future presentation
- Try struct instead of array for PartitionedImMap HOT 1
- Add output of the ImHashMap as mermaid diagram HOT 1
- Merge the ImMap and ImHashMap implementations
- Optimize Enumerable for the PartitionedHashMap
- Reduce ImHashMap memory allocations keeping the speed
- Add AddSureNotPresent methods to compensate for GetSurePresent methods
- Optimize the case of split B2 to B3 when B2 other leaf still accommodate the Entry
- Fast mutable non-concurrent HashMap HOT 1
- Add to the ImHashMap ref state arguments to be propagated into the Update delegates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imtools.