|
22 | 22 | #### Replace PCollection-based prototypes with custom performant implementations
|
23 | 23 |
|
24 | 24 | - `PersistentList` implementation is backed by a bit-mapped trie with branching factor of 32
|
25 |
| - * `add(element: E)` and `removeAt(size - 1)` operations take O(1) time, down from O(log<sub>2</sub>n) |
26 |
| - * `get` and `set` operations take O(log<sub>32</sub>n), down from O(log<sub>2</sub>n) (though the same asymptotic) |
27 |
| - * Iteration has the same time complexity of O(n), but much faster in practice due to the better reference locality |
| 25 | + * `add(element: E)` and `removeAt(size - 1)` operations take O(1) time, down from O(log<sub>2</sub>n) :chart_with_downwards_trend: |
| 26 | + * `get` and `set` operations take O(log<sub>32</sub>n), down from O(log<sub>2</sub>n) (though the same asymptotic) :chart_with_downwards_trend: |
| 27 | + * Iteration has the same time complexity of O(n), but much faster in practice due to the better reference locality :chart_with_downwards_trend: |
28 | 28 | - Unordered `PersistentSet` implementation is backed by a hash-array mapped trie (a.k.a. HAMT) with up to 32 children or elements in a node
|
29 |
| - * `contains`, `add` and `remove` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) |
30 |
| - * Iteration has the same time complexity of O(n), but much faster in practice due to the better reference locality |
| 29 | + * `contains`, `add` and `remove` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) :chart_with_downwards_trend: |
| 30 | + * Iteration has the same time complexity of O(n), but much faster in practice due to the better reference locality :chart_with_downwards_trend: |
31 | 31 | - Unordered `PersistentMap` implementation is backed by a compressed hash-array mapped prefix-tree (a.k.a. CHAMP) with up to 32 children or entries in a node
|
32 |
| - * `contains`, `get`, `put` and `remove` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) |
33 |
| - * Iteration has the same time complexity of O(n), but much faster in practice due to the better reference locality |
| 32 | + * `contains`, `get`, `put` and `remove` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) :chart_with_downwards_trend: |
| 33 | + * Iteration has the same time complexity of O(n), but much faster in practice due to the better reference locality :chart_with_downwards_trend: |
34 | 34 | - Ordered `PersistentSet` implementation is backed by the unordered `PersistentMap` which maps elements in this set to next and previous elements in insertion order
|
35 |
| - * `contains`, `get` and `put` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) |
36 |
| - * `remove` operation takes O(log<sub>32</sub>n) time, down from O(n) |
37 |
| - * Iteration takes O(n log<sub>32</sub>n) time, up from O(n) |
| 35 | + * `contains`, `get` and `put` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) :chart_with_downwards_trend: |
| 36 | + * `remove` operation takes O(log<sub>32</sub>n) time, down from O(n) :chart_with_downwards_trend: |
| 37 | + * Iteration takes O(n log<sub>32</sub>n) time, up from O(n) :chart_with_upwards_trend: |
38 | 38 | - Ordered `PersistentMap` implementation is backed by the unordered `PersistentMap` which maps keys in this map to values, next and previous keys in insertion order
|
39 |
| - * `contains`, `get` and `put` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) |
40 |
| - * `remove` operation takes O(log<sub>32</sub>n) time, down from O(n) |
41 |
| - * Iteration takes O(n log<sub>32</sub>n) time, up from O(n) |
| 39 | + * `contains`, `get` and `put` operations take O(log<sub>32</sub>n) time, down from O(log<sub>2</sub>n) :chart_with_downwards_trend: |
| 40 | + * `remove` operation takes O(log<sub>32</sub>n) time, down from O(n) :chart_with_downwards_trend: |
| 41 | + * Iteration takes O(n log<sub>32</sub>n) time, up from O(n) :chart_with_upwards_trend: |
42 | 42 | - Builders are backed by the same backing storage as the corresponding persistent collections, but apply modifications in-place if the node has already been copied
|
43 |
| - * Time complexities of all operations are the same as of the corresponding persistent collections. However, avoiding memory allocations leads to significant performance improvement |
| 43 | + * Time complexities of all operations are the same as of the corresponding persistent collections. However, avoiding memory allocations leads to significant performance improvement :chart_with_downwards_trend: |
0 commit comments