From 99a063870151d571519b07e4c18b4a55afb84853 Mon Sep 17 00:00:00 2001 From: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com> Date: Sun, 13 Oct 2024 01:44:01 +0000 Subject: [PATCH] Make: Versioning Ubuntu CI --- .github/workflows/prerelease.yml | 8 ++++---- .github/workflows/release.yml | 10 +++++----- README.md | 22 ++++++++++++++++++++++ include/stringzilla/stringzilla.hpp | 1 + 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 3fbe9b44..d78a542e 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -20,7 +20,7 @@ permissions: jobs: versioning: name: Update Version - runs-on: ubuntu-24 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -402,7 +402,7 @@ jobs: test_alpine: name: Alpine Linux - runs-on: ubuntu-24 + runs-on: ubuntu-24.04 container: image: alpine:latest options: --privileged # If needed for certain Docker operations @@ -451,7 +451,7 @@ jobs: ] strategy: matrix: - os: [ubuntu-24, macos-13, windows-2022] + os: [ubuntu-24.04, macos-13, windows-2022] python-version: ["36", "37", "38", "39", "310", "311", "312"] steps: - uses: actions/checkout@v4 @@ -462,7 +462,7 @@ jobs: # We only need QEMU for Linux builds - name: Setup QEMU - if: matrix.os == 'ubuntu-24' + if: matrix.os == 'ubuntu-24.04' uses: docker/setup-qemu-action@v3 - name: Install cibuildwheel run: python -m pip install cibuildwheel diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 144ae8b0..a841803b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ permissions: jobs: versioning: name: Update Version - runs-on: ubuntu-24 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -49,7 +49,7 @@ jobs: rebase: name: Rebase Dev. Branch - runs-on: ubuntu-24 + runs-on: ubuntu-24.04 if: github.ref == 'refs/heads/main' needs: versioning steps: @@ -78,7 +78,7 @@ jobs: needs: versioning strategy: matrix: - os: [ubuntu-24, macos-13, windows-2022] + os: [ubuntu-24.04, macos-13, windows-2022] python-version: ["36", "37", "38", "39", "310", "311", "312"] steps: - uses: actions/checkout@v4 @@ -90,7 +90,7 @@ jobs: with: python-version: 3.x - name: Setup QEMU - if: matrix.os == 'ubuntu-24' # We only need QEMU for Linux builds + if: matrix.os == 'ubuntu-24.04' # We only need QEMU for Linux builds uses: docker/setup-qemu-action@v3 - name: Install cibuildwheel run: python -m pip install cibuildwheel @@ -153,7 +153,7 @@ jobs: # publish_javascript: # name: Publish JavaScript # needs: versioning - # runs-on: ubuntu-24 + # runs-on: ubuntu-24.04 # steps: # - uses: actions/checkout@v4 # with: diff --git a/README.md b/README.md index b5e1f880..96a3c1fe 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,28 @@ __Who is this for?__ arm: 25.8 MB/s + + + Mapping Characters with Look-Up Table Transforms + + + ⚪ + + transform
+ x86: 3.81 · + arm: 2.65 GB/s + + + str.translate
+ x86: 260.0 · + arm: 140.0 MB/s + + + sz_look_up_transform
+ x86: 21.2 · + arm: 8.5 GB/s + + Get sorted order, ≅ 8 million English words 6 diff --git a/include/stringzilla/stringzilla.hpp b/include/stringzilla/stringzilla.hpp index 18af8b21..736877df 100644 --- a/include/stringzilla/stringzilla.hpp +++ b/include/stringzilla/stringzilla.hpp @@ -1962,6 +1962,7 @@ class basic_string_slice { * * `try_` exception-free "try" operations that returning non-zero values on success, * * `replace_all` and `erase_all` similar to Boost, * * `edit_distance` - Levenshtein distance computation reusing the allocator, + * * `translate` - character mapping, * * `randomize`, `random` - for fast random string generation. * * Functions defined for `basic_string_slice`, but not present in `basic_string`: