针对 Rust 的 SIMD 加速 UTF-8 验证。

时间:2021-06-28 19:14:22
【文件属性】:
文件名称:针对 Rust 的 SIMD 加速 UTF-8 验证。
文件大小:1.12MB
文件格式:ZIP
更新时间:2021-06-28 19:14:22
rust unicode utf-8 simd-extensions simdutf8 – Rust 的高速 UTF-8 验证基于simdjson的实现,使用 SIMD 扩展对 Rust 进行极快的 API 兼容 UTF-8 验证。最初由simd-json.rs的开发人员移植到 Rust。免责声明该软件(还)不应该用于生产,尽管它已经用样本数据和模糊测试进行了测试,并且没有已知的错误。特征用于最快验证的basic API,针对有效的 UTF-8 进行了优化compat API 作为std::str::from_utf8()的完全兼容替代品在非 ASCII 上比 std 库快 22 倍,在 ASCII 上*倍与原始 simdjson 实现一样快或更快支持 x86 和 x86-64 上的 AVX 2 和 SSE 4.2 实现。计划支持 ARMv7 和 ARMv8 霓虹灯根据 CPU 支持在运行时选择最快的实现用纯 Rust 编写无依赖无标准支持如果不支持 SIMD 扩展,则回退到优秀的 std 实现快速开始将依赖项添加到 Cargo.toml 文件:[dependencies ]simdutf8 = {version =" 0.1.1" }使用simdut
【文件预览】:
simdutf8-main
----.gitignore(28B)
----inlining()
--------expected-methods-aarch64-neon.txt(455B)
--------expected-methods-x86-nostd-fallback.txt(252B)
--------expected-methods-x86-std.txt(917B)
--------expected-methods-x86-nostd-avx2.txt(550B)
--------expected-methods-aarch64-fallback.txt(252B)
--------expected-methods-x86-nostd-sse42.txt(552B)
--------expected-methods-x86-std-avx2.txt(550B)
----LICENSE-Apache(10KB)
----src()
--------compat.rs(4KB)
--------basic.rs(10KB)
--------implementation()
--------lib.rs(4KB)
----CHANGELOG.md(2KB)
----Cargo.toml(1KB)
----bench()
--------.gitignore(19B)
--------benches()
--------data()
--------src()
--------BENCHMARKING.md(2KB)
--------Cargo.toml(891B)
--------baselines()
--------simdjson-utf8()
----.github()
--------workflows()
----examples()
--------streaming.rs(960B)
----LICENSE-MIT(1KB)
----README.md(8KB)
----tests()
--------tests.rs(14KB)
----rustfmt.toml(14B)
----fuzzing()
--------src()
--------fuzz()
--------afl()
--------Cargo.toml(217B)
--------honggfuzz()
--------common()
----TODO.md(577B)
----img()
--------basic-vs-simdjson.png(348KB)
--------basic-vs-compat.png(303KB)
--------basic-vs-std.png(308KB)

网友评论