hrldcpr / pcollections

A Persistent Java Collections Library
Other
765 stars 79 forks source link

How do I initialize a large set? #87

Closed kachebb closed 2 years ago

kachebb commented 4 years ago

I want to initialize a large set but MapPSet::plusAll doesn't seem to be an efficient implementation.

If a set is initialized by 1 million elements, it would call MapPSet::plus 1 million times and leave 1 million persisted collection. However, I only need the last one.

Is there a way I can initialize the collection faster?

Thanks!

hrldcpr commented 2 years ago

Sorry for never responding to this, it's a good question. I think it will be covered by #90 so I'll close this issue.