{"id":16715448,"url":"https://github.com/philippeitis/simd_position_rs","last_synced_at":"2025-03-15T08:46:09.387Z","repository":{"id":111799844,"uuid":"336164950","full_name":"philippeitis/simd_position_rs","owner":"philippeitis","description":"Simd accelerated position functions for Rust","archived":false,"fork":false,"pushed_at":"2021-02-06T00:37:49.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T23:41:26.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philippeitis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-02-05T04:38:10.000Z","updated_at":"2021-02-06T00:37:52.000Z","dependencies_parsed_at":"2023-09-07T20:06:29.817Z","dependency_job_id":null,"html_url":"https://github.com/philippeitis/simd_position_rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fsimd_position_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fsimd_position_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fsimd_position_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fsimd_position_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philippeitis","download_url":"https://codeload.github.com/philippeitis/simd_position_rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707308,"owners_count":20334615,"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":[],"created_at":"2024-10-12T21:09:25.965Z","updated_at":"2025-03-15T08:46:09.369Z","avatar_url":"https://github.com/philippeitis.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simd_position\nA crate providing SIMD acceleration for finding the position of the first value in a collection either equal to, or not equal to a given value.\n\n```rust\nuse simd_position::Position;\nfn main() {\n    let a = vec![1, 2, 3, 4];\n    let val = 2;\n    assert_eq!(a.iter().position(|x| x.eq(\u0026val)), a.find_val_eq(val));\n    assert_eq!(a.iter().position(|x| x.ne(\u0026val)), a.find_val_ne(val));\n}\n```\n\n## Benchmarks\nBenchmarks using `RUSTFLAGS=-C target-cpu=znver2`, `cargo +nightly bench`. Code available in `src/benchmarks/bench.rs`\n```\ntest bench::bench_u32_first_nonzero_naive_1000000 ... bench:     480,178 ns/iter (+/- 38,643)\ntest bench::bench_u32_first_nonzero_simd_1000000  ... bench:      81,858 ns/iter (+/- 4,781)\n\ntest bench::bench_u32_position_naive_1000000      ... bench:     120,047 ns/iter (+/- 6,366)\ntest bench::bench_u32_position_simd_1000000       ... bench:      40,603 ns/iter (+/- 4,124)\n\ntest bench::bench_u8_first_nonzero_naive_1000000  ... bench:     241,350 ns/iter (+/- 16,515)\ntest bench::bench_u8_first_nonzero_simd_1000000   ... bench:      20,291 ns/iter (+/- 1,008)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippeitis%2Fsimd_position_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilippeitis%2Fsimd_position_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippeitis%2Fsimd_position_rs/lists"}