Skip to content

Commit

Permalink
str short, 128-bit SIMD, AVX512VL split
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Apr 30, 2024
1 parent 16fc57f commit 152d3f2
Show file tree
Hide file tree
Showing 8 changed files with 467 additions and 310 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
options: --user 0
steps:

- name: cpuinfo
run: cat /proc/cpuinfo

- uses: actions/checkout@v4

- name: Build environment
Expand All @@ -98,7 +101,7 @@ jobs:
- name: maturin
run: |
maturin build --release --strip \
--features=no-panic,unstable-simd,yyjson \
--features=avx512,no-panic,unstable-simd,yyjson \
--compatibility manylinux_2_17 \
--interpreter python${{ matrix.python.version }} \
--target=x86_64-unknown-linux-gnu
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
{ rust: "1.72", features: "" },
{ rust: "1.72", features: "--features=yyjson" },
{ rust: "nightly-2024-04-30", features: "--features=yyjson,unstable-simd"},
{ rust: "nightly-2024-04-30", features: "--features=avx512,yyjson,unstable-simd"},
]
python: [
{ version: '3.13' },
Expand All @@ -26,6 +27,9 @@ jobs:
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${{ matrix.profile.rust }} --profile minimal -y

- name: cpuinfo
run: cat /proc/cpuinfo

- uses: actions/setup-python@v5
with:
allow-prereleases: true
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ default = []
# Use SIMD intrinsics. This requires Rust on the nightly channel.
unstable-simd = []

# Include runtime-detected functions that use AVX512VL. Requires unstable-simd and amd64.
avx512 = []

no-panic = [
"itoa/no-panic",
"ryu/no-panic",
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
// SPDX-License-Identifier: (Apache-2.0 OR MIT)

#![cfg_attr(
all(target_arch = "x86_64", feature = "avx512"),
feature(avx512_target_feature)
)]
#![cfg_attr(
all(target_arch = "x86_64", feature = "avx512"),
feature(stdarch_x86_avx512)
)]
#![cfg_attr(feature = "intrinsics", feature(core_intrinsics))]
#![cfg_attr(feature = "optimize", feature(optimize_attribute))]
#![cfg_attr(feature = "strict_provenance", feature(strict_provenance))]
Expand Down
293 changes: 0 additions & 293 deletions src/serialize/writer/escape.rs

This file was deleted.

Loading

0 comments on commit 152d3f2

Please sign in to comment.