SIMD Optimizations and can_error checks#2270
Conversation
|
One of the tests failed for 478165c. @admin check logs None, packit dashboard https://dashboard.packit.dev/jobs/copr/3194546 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/10068861/ |
|
One of the tests failed for 4f31e24. @admin check logs None, packit dashboard https://dashboard.packit.dev/jobs/copr/3194728 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/10069004/ |
|
I’ve finished the portable SWAR implementation for skip_ws including comprehensive benchmarks (which show great results). |
|
@wilkolbrzym-coder, I'm going to benchmark your pull request as soon as I'm able. And, I'll make sure I get things merged together. I'm still making adjustments and doing more benchmarking for these changes. |
|
One of the tests failed for 532c83b. @admin check logs None, packit dashboard https://dashboard.packit.dev/jobs/copr/3195125 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/10069231/ |
|
One of the tests failed for 532c83b. @admin check logs None, packit dashboard https://dashboard.packit.dev/jobs/copr/3195124 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/10069231/ |
|
Impressive work on the SIMD refactoring, @stephenberry! The new structure is really clean. I was curious—is AVX-512 support on your roadmap, or are you sticking with AVX2 for now to avoid the complexity/throttling trade-offs? 64-byte processing would be a beastly addition! |
SIMD String Escape Refactoring
simd/simd.hpp, with per-ISA headers:avx.hpp,sse.hpp,neon.hpp.cmpeq/movemaskinstead of the previous SWAR-in-YMM approach.write_escapelambda shared across all SIMD and SWAR paths.Write Optimization (
can_error)static constexpr bool can_errortoto<JSON, T>specializations for types that cannot fail during writing (bool, numbers, strings, enums, bitset, flags, null, nullable).ctx.errorchecks andensure_spacecalls when all fields are known to be error-free at compile time.array_padding_knownto also cover arrays of objects with computablefixed_padding.New Utility Header
util/bit.hppconsolidatingcountr_zero,countl_zero, andint_log2(previously scattered acrossparse.hppanddtoa.hpp).bit.hppdirectly rather than relying on transitive includes throughwrite.hpp.__has_builtinchecks to match the actual builtin being called.Documentation
installation.md, andoptimizing-performance.mdto document SSE2, NEON, and theGLZ_DISABLE_SIMDoption.