Skip to content

perf: use SSE2 for CPC_TAKE_TILL_ONE_OF - #13

Merged
steve-chavez merged 3 commits into
PostgREST:masterfrom
steve-chavez:simd-1
Oct 12, 2026
Merged

steve-chavez merged 3 commits into
PostgREST:masterfrom
steve-chavez:simd-1

Conversation

@steve-chavez

@steve-chavez steve-chavez commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

This proves to be ~1.30 faster compared to current master

./bench/bench_regression.sh master build/csv_simd_demo

Summary
  build/csv_simd_demo < bench/data/customers-1000000.csv ran
    1.31 ± 0.06 times faster than /tmp/nix-shell-208285-0/tmp.FxzsLSSdS3/ref/build/csv_simd_demo

Also allows us to remove the dependency on string.h memchr.

Disadvantage is that now we depend on __builtin_ctz (only available on GCC/Clang), but I'm putting a fallback if unavailable.

This proves to be ~1.30 faster compared to current master

```
./bench/bench_regression.sh master build/csv_simd_demo

Summary
  build/csv_simd_demo < bench/data/customers-1000000.csv ran
    1.31 ± 0.06 times faster than /tmp/nix-shell-208285-0/tmp.FxzsLSSdS3/ref/build/csv_simd_demo
```
This doesn't seem to increase the performance, so it's just a refactor.
This allows us to remove usage of string.h.
@steve-chavez
steve-chavez merged commit 9c9786e into PostgREST:master Oct 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant