New escape algorithm with significantly less data dependency

This commit is contained in:
John Keiser
2023-08-01 00:07:58 -07:00
parent 2ccd5b9c97
commit 06afe9ecb3
16 changed files with 1639 additions and 1110 deletions
-12
View File
@@ -98,18 +98,6 @@ simdjson_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2,
//
namespace simdjson {
namespace ppc64 {
namespace {
namespace stage1 {
simdjson_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
// On PPC, we don't short-circuit this if there are no backslashes, because the branch gives us no
// benefit and therefore makes things worse.
// if (!backslash) { uint64_t escaped = prev_escaped; prev_escaped = 0; return escaped; }
return find_escaped_branchless(backslash);
}
} // namespace stage1
} // unnamed namespace
simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept {
return ppc64::stage1::json_minifier::minify<64>(buf, len, dst, dst_len);