You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Prebuilt PHP 8.6 binaries attached to releases: Linux (glibc x86_64 and arm64), macOS (arm64), and Windows DLLs (x64 and x86, TS and NTS).
Fixed
BMPM preserves the combining dot when lowercasing Turkish capital İ, matching Commons Codec rule contexts and encodings (for example, İhsan). bmpm_match() uses the corrected encoding; DM Soundex is unchanged.
Performance
BMPM extends phonemes in place for rules with one alternative and no language restriction, reuses one builder across each final pass, finds ASCII rule buckets and rulesets through tables built at startup, and sorts final sets of up to 32 phonemes by insertion. bmpm() and bmpm_match() take 10-23% less time on a list of Latin-script surnames (Linux x86-64; GCC 12 and 14, Clang 18). Encodings, matches, and budget errors are unchanged.
BMPM rule contexts are classified and parsed once at startup instead of on every candidate rule match, and language guessing tests a rule's required letters with one bitmask check. bmpm() and bmpm_match() take about 10-20% less time on Latin-script surnames. Matching rules are unchanged; tests/bmpm_corpus_digest.phpt pins the encodings of a generated corpus for each name type and accuracy, and for each named forced language at approximate accuracy.
BMPM language guessing skips rules whose required non-ASCII letters are absent from the input, as it already did for ASCII letters. bmpm() runs 15-25% faster on Latin-script surnames and 40-55% faster on accented and Cyrillic names; encoded output is unchanged.
Daitch-Mokotoff Soundex orders each first-byte rule bucket longest-first at startup, allowing encoding to stop at the first matching pattern. Encoded codes, branch order, matching behavior, and resource limits are unchanged.
Daitch-Mokotoff Soundex compares rule patterns inline after the bucket's first byte, and compares and hashes branch codes as one zero-padded 8-byte word instead of with strcmp() and a per-byte FNV-1a hash. dm_soundex() and dm_soundex_match() take about 13-20% less time on name lists. Codes, branch order, matches, work-budget errors, the input byte cap, and the 128-branch cap are unchanged; tests/dm_soundex_corpus_digest.phpt pins the codes and matches of a generated corpus.
Daitch-Mokotoff Soundex keeps the cleaned input in a 256-byte stack buffer and each branch set's first 8 branches inline, and tracks code-alternative lengths instead of calling strlen(), memcmp(), and strcmp() on replacements of at most 3 characters. dm_soundex() and dm_soundex_match() take about 15-21% less time on name lists. Longer cleaned inputs and larger sets move to heap storage. Codes, branch order, matches, work-budget errors, the input byte cap, and the 128-branch cap are unchanged; tests/dm_soundex_corpus_digest.phpt pins the codes and matches of a generated corpus.
NYSIIS uses stack scratch space for inputs shorter than 128 bytes, avoiding a temporary heap allocation in both nysiis() and nysiis_match(). Longer inputs keep the heap-backed path; encoded keys and length limits are unchanged.
bmpm_match() compares a single indexed phonetic token directly instead of building a hash table, avoiding temporary table and token-key allocations. Grouped output and exact token boundaries retain the same matching behavior.
Double Metaphone folds input and builds both codes in 128-byte stack buffers that move to the heap only when they fill, and double_metaphone() inserts its primary and alternate keys as strings interned at startup. double_metaphone() and double_metaphone_match() take about 42-45% less time on name lists. Codes and match results are unchanged; tests/double_metaphone_corpus_digest.phpt pins them for a generated corpus at several code lengths.