Updated October 2026
How Dataline reduces CJK matching work
Here is what a traditional master data management engine does when you ask it whether 陳大文 and Chan Tai Man are the same person: it converts the characters to pinyin ("chen"), runs NYSIIS to get a phonetic code, then string-compares the result against a phonetic code derived from the Latin name. Each step allocates a new string. Each step applies a rule engine. Each step throws away information.
Here is what Dataline does: it looks up stroke sequences in a HashMap, computes Euclidean distance on pre-indexed phoneme coordinates, checks a normalization dictionary, and returns three scores. Total time: 1.7 microseconds.
Candidate grouping and match quality
The current batch pipeline runs ten hash-grouping passes: five phone-backed passes before three district passes and two name-only passes. Groups store member lists without expanding every possible pair. A group of 10,000 records stores 10,000 indices rather than enumerating roughly 50 million pairs.
Earlier group members generally skip later passes. Phone passes can add new members to existing phone groups. Consumed means grouped, not successfully matched: name-only cohorts and members rejected during validation are not retried later in the same run. Phone groups compare members against their richest representative; residual blocks still enumerate pairs and skip blocks over 5,000 members. The full pipeline has no linear-time or complete-recall guarantee.
On the synthetic 1M-person benchmark (2.7 million records), accepted links achieve 99.9986% pair precision at 38.4% pair recall. The two name-only passes contain 27.6 million implicit pairs, only 0.026% of which identify the same person. That is candidate ambiguity, not the precision of an all-pairs matcher. Grouping consumes 99.9% of records, which is not a resolution rate. Six accepted direct edges are incorrect; two additional incorrect outputs are review candidates. Candidate membership alone does not establish identity.
A fresh full run took 102 seconds with 12 Rayon threads in a Linux environment. This includes parsing, grouping, rule validation, and output. See the README benchmark definitions and reproduction commands to measure both accepted-link precision and recall. These synthetic results do not establish enterprise accuracy.
1. Direct character operations, no transliteration
The conventional pipeline is: character → romanization → phonetic code → string comparison. Three transformations, three allocations, three opportunities to lose information.
Dataline skips all intermediate string representations:
- Visual signal: HashMap lookup for stroke sequences, then Levenshtein distance directly on the stroke arrays. The stroke sequences are borrowed from the dictionary (not copied). No strings allocated.
- Phonetic signal: Array index for pinyin, then Euclidean distance on 2D phoneme coordinates. This is the DimSim approach: each syllable maps to a point in a learned 2D space where phonetically similar syllables are geometrically close. The comparison is pure arithmetic. No string comparison at all.
- Normalization: Single HashMap lookup. Returns a boolean.
2. Compiled lookup tables, not rule engines
MDM engines love rule engines. Character transliteration involves cultural rules, special cases, context-dependent transformations. Each rule is a branch the CPU has to evaluate. Branch mispredictions are expensive. Rule engines are, by construction, branch-misprediction machines.
Dataline replaces rule chains with pre-compiled data:
| Operation | Traditional | Dataline |
|---|---|---|
| Char → pronunciation | Rule-based transliteration | rust-pinyin compiled lookup |
| Pronunciation → key | NYSIIS / Soundex rules | DimSim 2D coords (const arrays) |
| Char → visual form | Radical decomposition | StrokeDict (20,901 entries) |
| S↔T normalization | OpenCC rule engine | NormDict (8K entries) |
HashMap lookups are O(1). Rule engines are O(rules). When your character set has 20,901 entries, the difference is not theoretical.
3. Zero-allocation scoring
When you are doing 500 million pairwise comparisons, the cost of the comparison function dominates everything. And the single most expensive thing a comparison function can do in a tight loop is allocate heap memory.
The traditional pipeline allocates at every stage: the original character becomes a pinyin string (allocation), which becomes an NYSIIS code (allocation), which gets compared in a buffer (allocation). Three allocations per character per comparison. For a 3-character name, that is 9 allocations per pair. At 500 million pairs, that is 4.5 billion allocations.
Dataline's scoring path allocates almost nothing:
- Stroke sequences are borrowed from the HashMap. No copy.
- DimSim coordinates live in const arrayscompiled into the binary. No allocation.
- Pinyin strings stay on the stack.
- The only remaining heap allocation (the pinyin String itself) goes away when you pre-compute it during record ingestion, which the batch pipeline now supports for prepared name components.
Saving 100 nanoseconds per pair across 500 million pairs is 50 seconds of wall-clock time. That is not a micro-optimization. It is the difference between "run it in the nightly batch window" and "run it whenever you want."
4. Focused scope
Commercial MDM engines handle 200+ cultural naming conventions. Patronymics, compound surnames, generational suffixes, honorifics, transliterations across dozens of scripts. Each convention adds branching logic to the hot path, and the hot path is where you live when you are doing 500 million comparisons.
Dataline handles two script families: CJK and Latin. That is it. The script detector routes each pair to the right matcher:
- Both CJK → Multi-signal matcher (1.7 µs/pair)
- Both Latin → Jaro-Winkler (503 ns/pair)
- Mixed → HK Government romanization comparison (implemented)
Character-scoring throughput does not predict full-pipeline matching time by itself. Candidate counts, field completeness, rule evaluation, and output costs all matter.
This is a product decision, not a technical limitation. We are not building Informatica. If you need to match Icelandic patronymics against Arabic transliterations, we are not your tool — and pretending otherwise would make us slower at the thing we are actually good at.
Scaling depends on candidate counts
Phonetic surname-only blocking can create large blocks for common surnames. The current pipeline already uses composite surname/district and surname/phone-suffix keys for residual records. These keys retrieve candidates; a phone suffix alone does not establish identity. Large residual blocks are skipped, so reducing comparison work can also reduce recall.
Parallel work reduces runtime only for comparisons the pipeline actually schedules. Historical extrapolations from per-character microbenchmarks to 10 million records are not measured batch runs. Report runtime with dataset size, hardware, accepted-link precision, and recall rather than treating throughput as evidence that every identity has been resolved.
Current support and remaining work
Prepared name components, precomputed Jyutping syllables, composite residual blocking, and cross-script romanization are implemented. Potential future work includes retrying corroborated records from unresolved cohorts, measuring candidate recall per pass, and splitting oversized residual blocks instead of skipping them. These are proposed improvements, not current capabilities or measured performance gains.
Reproduce character-scoring microbenchmarks with cargo bench. Use the README pipeline commands to measure batch performance together with match precision and recall.
git clone https://github.com/digital-rain-tech/dataline.git cd dataline cargo bench
Apache 2.0. Free forever.