8000 str short, 128-bit SIMD, AVX512VL split · ijl/orjson@66c872e · GitHub
[go: up one dir, main page]

Skip to content

Commit 66c872e

Browse files
committed
str short, 128-bit SIMD, AVX512VL split
1 parent a1a2ed9 commit 66c872e

File tree

8 files changed

+466
-309
lines changed

8 files changed

+466
-309
lines changed

.github/workflows/artifact.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ jobs:
7979
options: --user 0
8080
steps:
8181

82+
- name: cpuinfo
83+
run: cat /proc/cpuinfo
84+
8285
- uses: actions/checkout@v4
8386

8487
- name: Build environment

.github/workflows/debug.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
{ rust: "1.72", features: "" },
1212
{ rust: "1.72", features: "--features=yyjson" },
1313
{ rust: "nightly-2024-04-30", features: "--features=yyjson,unstable-simd"},
14+
{ rust: "nightly-2024-04-30", features: "--features=avx512,yyjson,unstable-simd"},
1415
]
1516
python: [
1617
{ version: '3.13' },
@@ -26,6 +27,9 @@ jobs:
2627
steps:
2728
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${{ matrix.profile.rust }} --profile minimal -y
2829

30+
- name: cpuinfo
31+
run: cat /proc/cpuinfo
32+
2933
- uses: actions/setup-python@v5
3034
with:
3135
allow-prereleases: true

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ default = []
3535
# Use SIMD intrinsics. This requires Rust on the nightly channel.
3636
unstable-simd = []
3737

38+
# Include runtime-detected functions that use AVX512VL. Requires unstable-simd and amd64.
39+
avx512 = []
40+
3841
no-panic = [
3942
"itoa/no-panic",
4043
"ryu/no-panic",

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
22

3+
#![cfg_attr(
4+
all(target_arch = "x86_64", feature = "avx512"),
5+
feature(avx512_target_feature)
6+
)]
7+
#![cfg_attr(
8+
all(target_arch = "x86_64", feature = "avx512"),
9+
feature(stdarch_x86_avx512)
10+
)]
311
#![cfg_attr(feature = "intrinsics", feature(core_intrinsics))]
412
#![cfg_attr(feature = "optimize", feature(optimize_attribute))]
513
#![cfg_attr(feature = "strict_provenance", feature(strict_provenance))]

src/serialize/writer/escape.rs

Lines changed: 0 additions & 293 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0