Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base Library Extension Doc: https://docs.google.com/document/d/1uKouujLL3KueLpqjjFV2gd4dqu_6GYD107WBb6_GSVE/edit - [x] Complete unit tests - [x] Consider making initCapacity an optional value with a default initial capacity - [x] While loop iterations over Arrays may be faster with an iterator due to a compiler optimization - [x] In functions where a new buffer is being constructed, have some consistent scheme for how to determine the new buffer's capacity. Should the new buffer have just enough space to hold its element, or be given some insertion leeway? - [x] Some class methods can be moved outside of the class since they don't need access to the underlying array - [x] Consider behavior of transpose on empty Buffers - [x] sort() can be optimized by hoisting helper functions - [x] Restore broken methods in Array.mo and Hash.mo - [x] Compare with original Buffer class and try to keep some level of backwards compatibility / deprecate old functions - [x] Fix naming to be consistent with user friendliness, other classes, and style / interface guide - [x] Add user friendly error messages / error checking - [x] Cleanup tests - [x] Add documentation for each function - [ ] Add examples for each function (put up as a separate PR) - [ ] A primitive array tabulate for var arrays would allow some nice optimizations (put up as a separate PR) - [x] Profile this class to see if a more scalable dynamic sequence is necessary and to resolve ambiguous design decisions This last point is related to the RRB Trees, Rope, and Finger Trees data structures that I was discussing before. For various reasons, I am leaning towards an RRB Tree implementation of a scalable sequence structure, if it is necessary. See a talk on this data structure here: https://www.youtube.com/watch?v=sPhpelUfu8Q Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kento Sugama <[email protected]>
- Loading branch information