Comments (2)
Unfortunately the SetMany
implementations are incorrect (#39, #32 (comment)).
I can think of ways to implement SetMany
such that it may perform fewer copies in some cases.
While the SetMany
function is executing, you have to keep track of which nodes are explicitly owned by the receiver map. These nodes are the ones that have been copied/allocated during SetMany
, as these cannot be referenced by other maps.
For such nodes you can treat the mutable
flag as true
(but not recursively!).
However, this is not simple to implement under the current API, and I think the values that are to be bulk-inserted would have to have some special properties for this to be worthwhile (i.e. they should fall into a small number of hash buckets, otherwise we don't save any allocations at all).
from immutable.
After some recent discussions, I still think it's valid to recommend the creation via varargs but I don't know about fully deprecating the builders now. Closing. Ta
from immutable.
Related Issues (19)
- Split the monolithic file into three separate files, one per data structure HOT 1
- Hasher for byte array HOT 1
- Feature Request: Allow to append/prepend multiple values HOT 2
- Feature Request: Delete List element HOT 2
- Add efficient list builder
- Feature Request: Make datastructures as Interface
- Generics? HOT 2
- Key constraint might not be ideal HOT 8
- Higher-order procedures HOT 3
- Add efficient map builder
- List - varargs for Append, NewList, Prepend HOT 1
- Set/SortedSet types HOT 3
- Add efficient sorted map builder
- Why ImmutableList of size 7 occupies 128 bytes? HOT 2
- SortedSetBuilder Doesn't Have a Mechanism To Return The Set HOT 1
- Allow Creating Immutable Builders (Map/SortedSet/List) intialised with initial Values
- Consider changing immutable types such as List[T] and Map[T] to use by-value semantics instead of by-reference
- Objects stored in maps are not stored as copies HOT 1
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 immutable.