You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blazingly fast API-compatible UTF-8 validation for Rust using SIMD extensions, based on the implementation from
8
-
[simdjson](https://github.com/simdjson/simdjson). Originally ported to Rust by the developers of [simd-json.rs](https://simd-json.rs).
8
+
[simdjson](https://github.com/simdjson/simdjson). Originally ported to Rust by the developers of [simd-json.rs](https://simd-json.rs), but now heavily improved.
9
9
10
-
## Disclaimer
11
-
This software should not (yet) be used in production, though it has been tested with sample data as well as
12
-
fuzzing and there are no known bugs.
10
+
## Status
11
+
This library has been thoroughly tested with sample data as well as fuzzing and there are no known bugs.
13
12
14
13
## Features
15
14
*`basic` API for the fastest validation, optimized for valid UTF-8
16
15
*`compat` API as a fully compatible replacement for `std::str::from_utf8()`
17
-
* Up to 22 times faster than the std library on non-ASCII, up to three times faster on ASCII
18
-
* As fast as or faster than the original simdjson implementation
19
-
* Supports AVX 2 and SSE 4.2 implementations on x86 and x86-64. ARMv7 and ARMv8 neon support is planned
20
-
* Selects the fastest implementation at runtime based on CPU support
16
+
* Supports AVX 2 and SSE 4.2 implementations on x86 and x86-64
17
+
* 🆕 ARM64 (Aarch64) SIMD is supported with Rust nightly (use feature `aarch64_neon`)
18
+
* x86-64: Up to 23 times faster than the std library on valid non-ASCII, up to four times faster on ASCII
19
+
* aarch64: Up to eleven times faster than the std library on valid non-ASCII, up to four times faster on ASCII (Apple Silicon)
20
+
* Faster than the original simdjson implementation
21
+
* Selects the fastest implementation at runtime based on CPU support (on x86)
22
+
* Falls back to the excellent std implementation if SIMD extensions are not supported
21
23
* Written in pure Rust
22
24
* No dependencies
23
25
* No-std support
24
-
* Falls back to the excellent std implementation if SIMD extensions are not supported
25
26
26
27
## Quick start
27
28
Add the dependency to your Cargo.toml file:
28
29
```toml
29
30
[dependencies]
30
-
simdutf8 = { version = "0.1.1" }
31
+
simdutf8 = { version = "0.1.2" }
32
+
```
33
+
or on ARM64 with Rust Nightly:
34
+
```toml
35
+
[dependencies]
36
+
simdutf8 = { version = "0.1.2", features = ["aarch64_neon"] }
31
37
```
32
38
33
-
Use `simdutf8::basic::from_utf8` as a drop-in replacement for `std::str::from_utf8()`.
39
+
Use `simdutf8::basic::from_utf8()` as a drop-in replacement for `std::str::from_utf8()`.
Simdutf8 is up to 23 times faster than the std library on valid non-ASCII, up to four times on pure ASCII.
107
119
108
-
### simdutf8 basic vs simdjson UTF-8 validation on AMD Zen 2
109
-

120
+
### simdutf8 basic vs std library on aarch64 (Apple Silicon)
0 commit comments