Skip to content

Commit 5f91e7e

Browse files
committed
Fix: Missing Georgian dispatch
It doesn't help much with long inputs but drastically improves performance for short queries. Before: 452.33 MiB/s After: 6.97 GiB/s
1 parent 23801e4 commit 5f91e7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/stringzilla/utf8_case.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4966,11 +4966,11 @@ SZ_INTERNAL void sz_utf8_case_insensitive_needle_metadata_(sz_cptr_t needle, sz_
49664966
sz_size_t diversity; // Distinct byte count (computed at end of each starting position)
49674967
} script_window_t_;
49684968

4969-
// Number of script kernels (indices 1-7 used, index 0 reserved)
4970-
sz_size_t const num_scripts = 8;
4969+
// Number of script kernels (indices 1-8 used, index 0 reserved)
4970+
sz_size_t const num_scripts = 9;
49714971

49724972
// Best window found so far for each script
4973-
script_window_t_ best[8];
4973+
script_window_t_ best[9];
49744974
for (sz_size_t i = 0; i < num_scripts; ++i) {
49754975
best[i].start_offset = 0;
49764976
best[i].input_length = 0;
@@ -4997,7 +4997,7 @@ SZ_INTERNAL void sz_utf8_case_insensitive_needle_metadata_(sz_cptr_t needle, sz_
49974997
// Iterate through each starting position in the needle (stepping by rune)
49984998
for (sz_u8_t const *start_ptr = needle_bytes; start_ptr < needle_end;) {
49994999
// Current window being built for each script at this starting position
5000-
script_window_t_ current[8];
5000+
script_window_t_ current[9];
50015001
for (sz_size_t i = 0; i < num_scripts; ++i) {
50025002
current[i].start_offset = (sz_size_t)(start_ptr - needle_bytes);
50035003
current[i].input_length = 0;

0 commit comments

Comments
 (0)