MCPcopy Create free account
hub / github.com/apache/fory / utf16_has_surrogate_pairs

Function utf16_has_surrogate_pairs

cpp/fory/util/string_util.h:311–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309 length % VECTOR_SIZE);
310}
311inline bool utf16_has_surrogate_pairs(const uint16_t *data, size_t length) {
312 // Direct fallback implementation - SIMD versions were consistently slower
313 // due to early-exit characteristics: surrogate pairs are rare and when
314 // present, often appear early in strings, making SIMD setup overhead
315 // outweigh any vectorization benefits.
316 return has_surrogate_pair_fallback(data, length);
317}
318
319#elif defined(FORY_HAS_NEON)
320inline bool is_ascii(const char *data, size_t length) {

Callers 2

read_python_stringFunction · 0.85
TESTFunction · 0.85

Calls 2

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68