Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Immy takes change-tracked data structures and makes them look immutable. In many cases, this gives you the programmatic benefits of immutable data structures as well as the benefits of near-native performance for mutations.
Other immutable data structure libraries tend to use implementations that rely on structural sharing of trees. When you create a new data structure from an existing one, the old data structure remains unchanged.
Immy relies on keeping track of changes to a single underlying data structure (think of Git for in-memory data structures). When you create a new data structure from an existing one, the underlying data structure is stolen from the old one and given to the new one with the change applied. This leaves the old data structure with a reference to the new one, and a diff that can be applied to reverse the change and get back to the old state.
Compared to a structural sharing approach, Immy's change tracking can result in significant performance and memory benefits for many cases. However, this comes at the cost of poor performance when accessing older data structures. As such, you should consider whether Immy is appropriate for your use case before deciding to use it over other libraries.
Check out the code and execute npm run benchmark
at a terminal.
TODO: include benchmark info in the README
If your usage of immutable data structures tends to be like this:
for (i = 0; i < 1000000; ++i) {
foo = foo.push(i)
}
doSomething(foo)
then Immy will be an extremely good fit for you. If you rely on being able to frequently access "older" versions of immutable data structures, like this:
var bar = foo
for (i = 0; i < 1000000; ++i) {
foo = foo.push(i)
}
doSomething(foo, bar)
then Immy might not be the best fit for your use case.
FAQs
Change-tracked data structures with an immutable API
The npm package immy receives a total of 0 weekly downloads. As such, immy popularity was classified as not popular.
We found that immy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.