/my-immutable

Yet another implementation of a persistent bitmap vector ala mori, Immutable.js, and Clojure.

Primary LanguageJavaScript

My Immutable

This is my incantation of immutable data structures, inspired by Phil Bagwell, Rick Hickey, David Nolen, and J.C.R. Licklider. The purpose of this project are:

  1. to learn how these data structures work.
  2. to implement a version that allows for serialization that takes advantage of structural sharing to reduce file size.

Plan

The plan is to implement:

Performance

Performance will be compared to mori.js, Immutable.js and the native JavaScript arrays and objects.

Progress

These are rough estimates

Todo

  • Bitmap-based Persistent Vector
    • try rewriting get in a non-recursive way
      • bit op optimization
    • delete
    • fast initialization
    • tail optimization (not what you are thinking)
      • each (x)
    • map (x)
    • filter (x)
    • reduce (x)
  • Tree-Map
    • map
    • filter
    • benchmark
    • each (x)
    • reduce (x)