insertion-set

Crates.ioinsertion-set
lib.rsinsertion-set
version0.1.1
sourcesrc
created_at2024-09-27 06:39:56.365957
updated_at2024-09-27 14:29:33.221309
descriptionPerforms a set of batched insertions on a vector
homepage
repositoryhttps://github.com/Techcable/insertion-set.rust
max_upload_size
id1388332
size34,731
(Techcable)

documentation

README

insertion-set

Crates.io Version docs.rs

Performs a set of batched insertions on a vector.

Vec::insert(index, value) takes O(n) time to move internal memory, so calling it in a loop can cause quadratic blowup.

If you batch multiple values together with an InsertionSet you can defer the expensive movement of the vector's memory till the of the loop.

This code was originally copied from the first prototype compiler for DuckLogic. It was inspired by the way the B3 JIT handles insertions.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 5

cargo fmt