{"id":15349771,"url":"https://github.com/psiace/bitsvec","last_synced_at":"2025-04-15T02:36:56.721Z","repository":{"id":57515193,"uuid":"458821775","full_name":"PsiACE/bitsvec","owner":"PsiACE","description":"A bit vector with the Rust standard library's portable SIMD API.","archived":false,"fork":false,"pushed_at":"2023-05-04T09:56:25.000Z","size":27,"stargazers_count":39,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T14:51:12.010Z","etag":null,"topics":["bitvec","no-std","rust","simd"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PsiACE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T13:45:12.000Z","updated_at":"2025-02-19T15:11:14.000Z","dependencies_parsed_at":"2024-10-16T01:40:45.010Z","dependency_job_id":"d78ab6f6-d850-4e83-9f82-6418f2b9b797","html_url":"https://github.com/PsiACE/bitsvec","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"d8330899c9403a67b1a9a93376d09bbdf27620f9"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbitsvec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbitsvec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbitsvec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbitsvec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PsiACE","download_url":"https://codeload.github.com/PsiACE/bitsvec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248995101,"owners_count":21195497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitvec","no-std","rust","simd"],"created_at":"2024-10-01T11:55:41.177Z","updated_at":"2025-04-15T02:36:56.420Z","avatar_url":"https://github.com/PsiACE.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003ebitsvec\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eA bit vector with \u003ca href=\"https://github.com/rust-lang/portable-simd\"\u003ethe Rust standard library's portable SIMD API\u003c/a\u003e\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://crates.io/crates/bitsvec\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/bitsvec.svg\" alt=\"crates.io page\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/bitsvec\"\u003e\u003cimg src=\"https://docs.rs/bitsvec/badge.svg\" alt=\"docs.rs docs\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Usage\n\nAdd `bitsvec` to `Cargo.toml`:\n\n```toml\nbitsvec = \"x.y.z\"\n```\n\nWrite some code like this:\n\n```rust\nlet mut bitvec = BitVec::ones(1000); // create a bitvec contains 0 ..= 999\nbitvec.set(900, false); // delete 900 from bitvec\nbitvec.set(1200, true); // add 1200 to bitvec (and expand bitvec to length 1201)\nlet bitvec2 = BitVec::ones(1000);\n\nlet new_bitvec = bitvec.and_cloned(\u0026bitvec2); // and operation, without consume\nlet new_bitvec2 = bitvec \u0026 bitvec2; // and operation, consume both bitvec\n\n// Operation Supported:\n// and, or, xor, not, eq, eq_left\n\nassert_eq!(new_bitvec, new_bitvec2);\n```\n\n## Performance\n\nCompared on AMD Ryzen 9 5900hs, aginst:\n\n* [bit_vec 0.6.3](https://docs.rs/bit-vec/0.6.3/bit_vec/index.html)\n* [bitvec 1.0.0](https://docs.rs/bitvec/1.0.0/bitvec/index.html)\n* [bitvec_simd  0.15.0](https://docs.rs/bitvec_simd/0.15.0/bitvec_simd/index.html)\n* [bitvector_simd 0.2.2](https://docs.rs/bitvector_simd/0.2.2/bitvector_simd/index.html)\n\n\u003cdetails open\u003e\n\n```\n$ cargo bench\n\nbitsvec(this crate)     time:   [330.34 ns 330.75 ns 331.18 ns]\nFound 6 outliers among 100 measurements (6.00%)\n  4 (4.00%) high mild\n  2 (2.00%) high severe\n\nbitsvec_u16x8(this crate)\n                        time:   [332.23 ns 333.90 ns 335.98 ns]\nFound 16 outliers among 100 measurements (16.00%)\n  6 (6.00%) high mild\n  10 (10.00%) high severe\n\nbitvec_simd 0.15.0      time:   [371.96 ns 372.23 ns 372.53 ns]\nFound 6 outliers among 100 measurements (6.00%)\n  4 (4.00%) high mild\n  2 (2.00%) high severe\n\nbitvec_simd 0.15.0 u16x8\n                        time:   [578.38 ns 578.68 ns 579.01 ns]\nFound 7 outliers among 100 measurements (7.00%)\n  6 (6.00%) high mild\n  1 (1.00%) high severe\n\nbitvector_simd 0.2.2    time:   [288.55 ns 289.11 ns 289.64 ns]\nFound 1 outliers among 100 measurements (1.00%)\n  1 (1.00%) high mild\n\nbit-vec 0.6             time:   [1.5177 us 1.5200 us 1.5224 us]\n\nbitvec 1.0              time:   [32.119 us 32.254 us 32.390 us]\n\nbitsvec(this crate) with creation\n                        time:   [888.59 ns 889.45 ns 890.39 ns]\nFound 10 outliers among 100 measurements (10.00%)\n  9 (9.00%) high mild\n  1 (1.00%) high severe\n                                                                                                              bitsvec_u16x8(this crate) with creation\n                        time:   [1.1006 us 1.1031 us 1.1059 us]\nFound 11 outliers among 100 measurements (11.00%)\n  8 (8.00%) high mild\n  3 (3.00%) high severe\n\nbitvec_simd 0.15.0 with creation\n                        time:   [970.09 ns 970.82 ns 971.67 ns]\nFound 12 outliers among 100 measurements (12.00%)\n  10 (10.00%) high mild\n  2 (2.00%) high severe\n                                                                                                              bitvec_simd 0.15.0 u16x8 with creation\n                        time:   [1.1158 us 1.1185 us 1.1215 us]\nFound 8 outliers among 100 measurements (8.00%)\n  6 (6.00%) low mild\n  2 (2.00%) high mild\n\nbitvector_simd 0.2.2 with creation\n                        time:   [736.46 ns 737.95 ns 739.49 ns]\nFound 1 outliers among 100 measurements (1.00%)\n  1 (1.00%) high severe\n\nbit-vec 0.6 with creation\n                        time:   [1.6515 us 1.6527 us 1.6539 us]\nFound 2 outliers among 100 measurements (2.00%)\n  2 (2.00%) high mild\n\nbitvec 1.0 with creation\n                        time:   [28.484 us 28.501 us 28.518 us]\nFound 20 outliers among 100 measurements (20.00%)\n  15 (15.00%) low severe\n  3 (3.00%) high mild\n  2 (2.00%) high severe\n\nbitsvec(this crate) resize false\n                        time:   [676.30 ns 677.13 ns 677.93 ns]\n                                                                                                              bitsvec_u16x8(this crate) resize false\n                        time:   [618.70 ns 619.73 ns 620.98 ns]\nFound 2 outliers among 100 measurements (2.00%)\n  1 (1.00%) high mild\n  1 (1.00%) high severe\n\nbitvec_simd 0.15.0 resize false\n                        time:   [676.27 ns 677.96 ns 679.66 ns]\nFound 4 outliers among 100 measurements (4.00%)\n  3 (3.00%) high mild\n  1 (1.00%) high severe\n\nbitvec_simd 0.15.0 u16x8 resize false\n                        time:   [472.84 ns 473.76 ns 474.71 ns]\nFound 2 outliers among 100 measurements (2.00%)\n  2 (2.00%) high mild\n\nbitvec 1.0 resize false time:   [108.23 us 108.29 us 108.36 us]\nFound 9 outliers among 100 measurements (9.00%)\n  6 (6.00%) high mild\n  3 (3.00%) high severe\n\nbitsvec(this crate) resize true\n                        time:   [679.71 ns 680.66 ns 681.75 ns]\nFound 9 outliers among 100 measurements (9.00%)\n  7 (7.00%) high mild\n  2 (2.00%) high severe\n\nbitsvec_u16x8(this crate) resize true\n                        time:   [876.21 ns 876.89 ns 877.71 ns]\nFound 8 outliers among 100 measurements (8.00%)\n  6 (6.00%) high mild\n  2 (2.00%) high severe\n\nbitvec_simd 0.15.0 resize true\n                        time:   [672.44 ns 672.82 ns 673.24 ns]\nFound 9 outliers among 100 measurements (9.00%)\n  6 (6.00%) high mild\n  3 (3.00%) high severe\n\nbitvec_simd 0.15.0 u16x8 resize true\n                        time:   [748.77 ns 751.48 ns 754.59 ns]\n\nbitvec 1.0 resize true  time:   [100.50 us 100.63 us 100.75 us]\n```\n\n\u003c/details open\u003e\n\n## Credits\n\nMost code of this crate is from (https://github.com/GCCFeli/bitvec_simd). On top of that, some changes were made.\n\n## License\n\nThis library is licensed under either of:\n\n* MIT license [LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT\n* Apache License 2.0 [LICENSE-APACHE](LICENSE-APACHE) or https://opensource.org/licenses/Apache-2.0\n\nat your option.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsiace%2Fbitsvec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsiace%2Fbitsvec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsiace%2Fbitsvec/lists"}