Tasks: date phrase corpus and parser benchmark #590

Open
opened 2026-10-18 18:46:09 +00:00 by kayg · 28 comments
Owner

Overnight measurement for task date phrases (T3, L17: our own TickTick-quality parser, breakage-tested on a corpus).

  • Build the golden corpus: chrono-node's English tests, TickTick-style task phrases ("call mom tmrw 5pm", "every 2nd tue", "next week", "by friday"), recurrence, and breakage cases (titles that only look like dates, typos, time zones, DST).
  • Score chrono-node, whichtime, interim and chrono-english on it: accuracy per category, false positives on plain titles, per-keystroke latency, bundle / WASM size.
  • Result: what our own grammar must cover, and whether any library is worth using as a base.

Research only, no product code. Results in calternal-research and here.

Overnight measurement for task date phrases (T3, L17: our own TickTick-quality parser, breakage-tested on a corpus). - Build the golden corpus: chrono-node's English tests, TickTick-style task phrases ("call mom tmrw 5pm", "every 2nd tue", "next week", "by friday"), recurrence, and breakage cases (titles that only look like dates, typos, time zones, DST). - Score chrono-node, whichtime, interim and chrono-english on it: accuracy per category, false positives on plain titles, per-keystroke latency, bundle / WASM size. - Result: what our own grammar must cover, and whether any library is worth using as a base. Research only, no product code. Results in calternal-research and here.
Author
Owner

Started research-only work for this issue. Branch: none created (the local product checkout is on dev); base SHA: a0785f1067. I am reading the existing benchmark reports first, then I will build the corpus and run the requested comparisons.

Started research-only work for this issue. Branch: none created (the local product checkout is on dev); base SHA: a0785f1067c617755fbb00605aa0d5bb39163569. I am reading the existing benchmark reports first, then I will build the corpus and run the requested comparisons.
Author
Owner

Finding: the earlier verification report had no task-date accuracy or WASM size measurements; it recommended an owned grammar with chrono-node tests as an oracle. Source evidence: Todoist documents “Friday” as the next Friday and “next Friday” as the Friday in the following week (https://www.todoist.com/help/todoist/features/schedule-a-date-and-time-for-your-todoist-tasks-q7VobO). Things documents 17d, 17d from jul9, and 3rd wed jul 2026, and says relative dates work in both When and Deadline (https://culturedcode.com/things/support/articles/9780167/). TickTick documents weekly weekday reminders at a chosen time and recurrence end date/count, but its public help page is picker-oriented rather than a detailed inline grammar (https://help.ticktick.com/articles/7055782206349770752). I am including these as provenance and covering cases, not assuming identical vendor semantics.

Finding: the earlier verification report had no task-date accuracy or WASM size measurements; it recommended an owned grammar with chrono-node tests as an oracle. Source evidence: Todoist documents “Friday” as the next Friday and “next Friday” as the Friday in the following week (https://www.todoist.com/help/todoist/features/schedule-a-date-and-time-for-your-todoist-tasks-q7VobO). Things documents `17d`, `17d from jul9`, and `3rd wed jul 2026`, and says relative dates work in both When and Deadline (https://culturedcode.com/things/support/articles/9780167/). TickTick documents weekly weekday reminders at a chosen time and recurrence end date/count, but its public help page is picker-oriented rather than a detailed inline grammar (https://help.ticktick.com/articles/7055782206349770752). I am including these as provenance and covering cases, not assuming identical vendor semantics.
Author
Owner

Corpus construction finding: the pinned chrono-node v2.10.3 English test files contain 545 extractable testSingleCase inputs (MIT; source commit d4fe7e39015c818b271d74789fb96f74777421d0). The working corpus now has 815 rows, including 160 authored no-date breakage titles and vendor-documented examples. Source: https://github.com/wanasit/chrono/tree/v2.10.3/test/en (MIT, recorded per row). All cases use a fixed 2026-10-19 09:00 Europe/Berlin reference so parser comparisons are deterministic; source test strings are retained, while their original anchors are normalized. Expected spans and values are being filled/checked before scoring.

Corpus construction finding: the pinned chrono-node v2.10.3 English test files contain 545 extractable `testSingleCase` inputs (MIT; source commit d4fe7e39015c818b271d74789fb96f74777421d0). The working corpus now has 815 rows, including 160 authored no-date breakage titles and vendor-documented examples. Source: https://github.com/wanasit/chrono/tree/v2.10.3/test/en (MIT, recorded per row). All cases use a fixed 2026-10-19 09:00 Europe/Berlin reference so parser comparisons are deterministic; source test strings are retained, while their original anchors are normalized. Expected spans and values are being filled/checked before scoring.
Author
Owner

Finding: chrono-node #604 documents a cross-month range failure on 26 July - 22 August in 2.8.3; the issue says the output was corrected by 2.10.1. I added this as an independent corpus regression for 2.10.3, anchored before July 2026. Source: https://github.com/wanasit/chrono/issues/604. The source review also found the newer whenparse v0.1 scope explicitly excludes timezone names and recurrence, while datewise v0.2.0 advertises locale, time zones, DST, and date spans; both are included in the comparison. Sources: https://crates.io/crates/whenparse and https://github.com/LostWarrior/Datewise.

Finding: chrono-node #604 documents a cross-month range failure on `26 July - 22 August` in 2.8.3; the issue says the output was corrected by 2.10.1. I added this as an independent corpus regression for 2.10.3, anchored before July 2026. Source: https://github.com/wanasit/chrono/issues/604. The source review also found the newer `whenparse` v0.1 scope explicitly excludes timezone names and recurrence, while `datewise` v0.2.0 advertises locale, time zones, DST, and date spans; both are included in the comparison. Sources: https://crates.io/crates/whenparse and https://github.com/LostWarrior/Datewise.
Author
Owner

Corpus update: the final JSONL now has 823 cases: 545 chrono-node v2.10.3 English test inputs plus 278 authored/documented cases, including 160 date-shaped task-title negatives. Fixed reference: 2026-10-19 09:00 Europe/Berlin. The upstream oracle rows are labeled separately from independent authored accuracy; four deliberately ambiguous cases are excluded from exact scoring. Recurrence fixtures carry RFC 5545 rule fields with DTSTART stored separately where the vendor example supplies a start date. Corpus and harness are in the research workspace only; no product files or branch changes.

Corpus update: the final JSONL now has 823 cases: 545 chrono-node v2.10.3 English test inputs plus 278 authored/documented cases, including 160 date-shaped task-title negatives. Fixed reference: 2026-10-19 09:00 Europe/Berlin. The upstream oracle rows are labeled separately from independent authored accuracy; four deliberately ambiguous cases are excluded from exact scoring. Recurrence fixtures carry RFC 5545 rule fields with DTSTART stored separately where the vendor example supplies a start date. Corpus and harness are in the research workspace only; no product files or branch changes.
Author
Owner

Corpus gate: CORPUS_STATUS=PASS cases=823 breakage=160 ambiguous=4 unresolved=0 span_errors=0. I checked every UTF-16 span against its input. The pinned chrono-node source cases now have oracle values and spans populated; the 278 authored and documented cases remain the independent accuracy set. Jiff 0.2.38 is the current registry version, and its documented defaults include several timezone database sources; I am measuring the minimal grammar both with no bundled database and with bundled tzdb. Source: https://docs.rs/crate/jiff/0.2.38/features

Corpus gate: CORPUS_STATUS=PASS cases=823 breakage=160 ambiguous=4 unresolved=0 span_errors=0. I checked every UTF-16 span against its input. The pinned chrono-node source cases now have oracle values and spans populated; the 278 authored and documented cases remain the independent accuracy set. Jiff 0.2.38 is the current registry version, and its documented defaults include several timezone database sources; I am measuring the minimal grammar both with no bundled database and with bundled tzdb. Source: https://docs.rs/crate/jiff/0.2.38/features
Author
Owner

First perf result: date_time_parser on the i9-9900K perf VM (4 vCPU), corpus 823 / 15,773 growing-prefix parses, run 1/5 had p50 6,402.18 µs and p95 8,517.08 µs; load 2.51→1.28, CPU steal 2.757%. This clean run is accepted. The other four runs are in progress. At this speed it misses the 1 ms target before any phone scaling.

First perf result: `date_time_parser` on the i9-9900K perf VM (4 vCPU), corpus 823 / 15,773 growing-prefix parses, run 1/5 had p50 6,402.18 µs and p95 8,517.08 µs; load 2.51→1.28, CPU steal 2.757%. This clean run is accepted. The other four runs are in progress. At this speed it misses the 1 ms target before any phone scaling.
Author
Owner

The 45-run gate passed (five accepted runs for each of nine parsers; all attempts over 5% steal were repeated). On the independent authored positive cases, exact values were: chrono-node 61/114, whichtime 43/114, date_time_parser 50/114; the other five Rust candidates returned zero exact inline authored positives because they parse the whole title instead of extracting a date phrase. Breakage false positives: chrono-node 41/160, whichtime 56/160, date_time_parser 96/160. The Rust date_time_parser wrapper also panicked on 18 full inputs, including Aug 96, invalid 2024/13/1, and month-rollover Plan in 1 month. No tested library produced an exact RFC 5545 rule for any of the 15 recurrence cases. Source-suite scores are reported separately because those expected values come from chrono-node itself.

The 45-run gate passed (five accepted runs for each of nine parsers; all attempts over 5% steal were repeated). On the independent authored positive cases, exact values were: chrono-node 61/114, whichtime 43/114, date_time_parser 50/114; the other five Rust candidates returned zero exact inline authored positives because they parse the whole title instead of extracting a date phrase. Breakage false positives: chrono-node 41/160, whichtime 56/160, date_time_parser 96/160. The Rust date_time_parser wrapper also panicked on 18 full inputs, including `Aug 96`, invalid `2024/13/1`, and month-rollover `Plan in 1 month`. No tested library produced an exact RFC 5545 rule for any of the 15 recurrence cases. Source-suite scores are reported separately because those expected values come from chrono-node itself.
Author
Owner

Correction to the previous update: it is the other six Rust candidates (interim, chrono-english, jiff-english, whenparse, datewise, and natural-date-rs) that returned zero exact authored positives in the inline-task cases.

Correction to the previous update: it is the other six Rust candidates (interim, chrono-english, jiff-english, whenparse, datewise, and natural-date-rs) that returned zero exact authored positives in the inline-task cases.
Author
Owner

Additional library flaw: interim 0.2.1 returned no exact values for the 114 authored positive inline cases, despite 157/274 authored all-case exactness from rejecting date-like titles. The low 3/160 breakage false positives are offset by seven panics on the full corpus, including Thursday 9AM, Sun 15Sep, and 10 August - 12 September. Its five accepted perf runs on the 4-vCPU i9-9900K (823 cases, 15,773 prefixes/run) had median p50 0.135 µs and median p95 1.338 µs; steal was 0% on all accepted runs.

Additional library flaw: interim 0.2.1 returned no exact values for the 114 authored positive inline cases, despite 157/274 authored all-case exactness from rejecting date-like titles. The low 3/160 breakage false positives are offset by seven panics on the full corpus, including `Thursday 9AM`, `Sun 15Sep`, and `10 August - 12 September`. Its five accepted perf runs on the 4-vCPU i9-9900K (823 cases, 15,773 prefixes/run) had median p50 0.135 µs and median p95 1.338 µs; steal was 0% on all accepted runs.
Author
Owner

Size measurements completed on the perf VM. Bun 1.4.2 minified the chrono-node root entry to 48,471 bytes; gzip -9 produced 13,480 bytes (267 modules bundled). A research-only Jiff 0.2.38 grammar probe built with Rust 1.98.1 and opt-level=z, then Binaryen 133 wasm-opt -Oz, measured 168,416 bytes without bundled TZDB and 423,219 bytes with Europe/Berlin lookup and bundled TZDB. The probe is a lower-bound estimate: it excludes wasm-bindgen/UniFFI glue, full production grammar, and JSON serialization.

Size measurements completed on the perf VM. Bun 1.4.2 minified the chrono-node root entry to 48,471 bytes; gzip -9 produced 13,480 bytes (267 modules bundled). A research-only Jiff 0.2.38 grammar probe built with Rust 1.98.1 and opt-level=z, then Binaryen 133 wasm-opt -Oz, measured 168,416 bytes without bundled TZDB and 423,219 bytes with Europe/Berlin lookup and bundled TZDB. The probe is a lower-bound estimate: it excludes wasm-bindgen/UniFFI glue, full production grammar, and JSON serialization.
Author
Owner

Finished the research pass for issue #590. No branch, product commit, PR, merge, or deployment was created. Product HEAD remained a0785f1067c617755fbb00605aa0d5bb39163569 (the starting base). The report and enriched corpus are in /home/kayg/Developer/calternal-research/.

Gate output:

CORPUS_STATUS=PASS cases=823 breakage=160 ambiguous=4 unresolved=0 span_errors=0
Finished release profile [optimized + debuginfo] target(s) in 59.80s
MATRIX_DONE accepted_runs=45 candidates=9 cases=823
wasm-opt version 133 (version_133)
SIZE name=chrono-node.min.js bytes=48471 sha256=9e23710aef8e1384d717f64ce680c429462300f74cdc21edf2fcc6b3804f5412
SIZE name=chrono-node.min.js.gz bytes=13480 sha256=a36c4cb4c5ce644273f0c18c3f37191d39d766a90323165ff0c0e3c3a4d540ca
SIZE name=no-tzdb.raw.wasm bytes=238760 sha256=3d4ed809cf5f465e1aa9d60cb685cbfd2e367679be9d0dd088e68dca234b7d2d
SIZE name=no-tzdb.oz.wasm bytes=168416 sha256=706d954e2e7d47d8d7a3ec364f12c8963e09ffdac69c08e13ec1413fb938181d
SIZE name=bundled-tzdb.raw.wasm bytes=524045 sha256=bb5a424daf0034bc5f840c9131d2c60cfe987fb0f51d0ea6bd2be569a46518ae
SIZE name=bundled-tzdb.oz.wasm bytes=423219 sha256=c9276eea66c63449b197c1abc014e578856d2ec6e3acf9e45d859345ca3061c1

All perf VM work files under /dev/shm/nlp590 were removed; /dev/shm returned to 0 used. I did not close this issue.

Finished the research pass for issue #590. No branch, product commit, PR, merge, or deployment was created. Product HEAD remained `a0785f1067c617755fbb00605aa0d5bb39163569` (the starting base). The report and enriched corpus are in `/home/kayg/Developer/calternal-research/`. Gate output: ```text CORPUS_STATUS=PASS cases=823 breakage=160 ambiguous=4 unresolved=0 span_errors=0 Finished release profile [optimized + debuginfo] target(s) in 59.80s MATRIX_DONE accepted_runs=45 candidates=9 cases=823 wasm-opt version 133 (version_133) SIZE name=chrono-node.min.js bytes=48471 sha256=9e23710aef8e1384d717f64ce680c429462300f74cdc21edf2fcc6b3804f5412 SIZE name=chrono-node.min.js.gz bytes=13480 sha256=a36c4cb4c5ce644273f0c18c3f37191d39d766a90323165ff0c0e3c3a4d540ca SIZE name=no-tzdb.raw.wasm bytes=238760 sha256=3d4ed809cf5f465e1aa9d60cb685cbfd2e367679be9d0dd088e68dca234b7d2d SIZE name=no-tzdb.oz.wasm bytes=168416 sha256=706d954e2e7d47d8d7a3ec364f12c8963e09ffdac69c08e13ec1413fb938181d SIZE name=bundled-tzdb.raw.wasm bytes=524045 sha256=bb5a424daf0034bc5f840c9131d2c60cfe987fb0f51d0ea6bd2be569a46518ae SIZE name=bundled-tzdb.oz.wasm bytes=423219 sha256=c9276eea66c63449b197c1abc014e578856d2ec6e3acf9e45d859345ca3061c1 ``` All perf VM work files under `/dev/shm/nlp590` were removed; `/dev/shm` returned to 0 used. I did not close this issue.
Author
Owner

kayg decisions (2026-10-19 09:4x IST):

  • N1 agreed: bare weekday = next occurrence including today; "this friday" when passed = next friday; "next friday" = the following week's.
  • N2: bare "5" = guess from the time of day (no question asked).
  • N3: numeric date order follows the app's date locale, which defaults to the system locale.
  • N4: open — re-explained (clock-change gap); recommendation: move forward by the gap (RFC 5545 / Apple Calendar), repeated hour = first one.
kayg decisions (2026-10-19 09:4x IST): - N1 agreed: bare weekday = next occurrence including today; "this friday" when passed = next friday; "next friday" = the following week's. - N2: bare "5" = guess from the time of day (no question asked). - N3: numeric date order follows the app's date locale, which defaults to the system locale. - N4: open — re-explained (clock-change gap); recommendation: move forward by the gap (RFC 5545 / Apple Calendar), repeated hour = first one.
Author
Owner

N4 agreed (kayg, 2026-10-19): a time skipped by a clock change moves forward by the jump (2:30 → 3:30, RFC 5545 / Apple Calendar); a repeated hour (clocks back) picks the first. All of N1–N4 settled; parser design can start.

N4 agreed (kayg, 2026-10-19): a time skipped by a clock change moves forward by the jump (2:30 → 3:30, RFC 5545 / Apple Calendar); a repeated hour (clocks back) picks the first. All of N1–N4 settled; parser design can start.
Author
Owner

Starting the ADR work on branch issue/590-nlp-adr, based on origin/dev at 1200114c32.

Starting the ADR work on branch issue/590-nlp-adr, based on origin/dev at 1200114c32e183889a47f3a71d0749718bd8a56f.
Author
Owner

Finding: ADR numbers 0049–0052 are already assigned in the in-flight auto-update and photos/files/tasks branches; the checked-out ADR set ends at 0048. I will use 0053. Evidence: git log --all -- docs/adr lists 0049, 0050, 0051 and 0052, including commits 45c79c2 and 6a2a2eb; origin has issue/auto-update-adr and issue/adrs-photos-files-tasks.

Finding: ADR numbers 0049–0052 are already assigned in the in-flight auto-update and photos/files/tasks branches; the checked-out ADR set ends at 0048. I will use 0053. Evidence: git log --all -- docs/adr lists 0049, 0050, 0051 and 0052, including commits 45c79c2 and 6a2a2eb; origin has issue/auto-update-adr and issue/adrs-photos-files-tasks.
Author
Owner

Finding: the Jiff WASM probe measured 168,416 optimized bytes without bundled TZDB and 423,219 with it; the report estimates a fuller parser at 185–220 KB and 440–475 KB respectively, before wasm-bindgen or UniFFI glue. Decision for the ADR: bundle timezone data in v1 to keep wall-time gap/fold resolution identical across Rust targets and set a 500 KB optimized WASM core cap. Evidence: nlp-bench-2026-10-19.md, Bundle and WASM size; nlp-corpus/wasm-estimate and harness/measure_sizes.sh.

Finding: the Jiff WASM probe measured 168,416 optimized bytes without bundled TZDB and 423,219 with it; the report estimates a fuller parser at 185–220 KB and 440–475 KB respectively, before wasm-bindgen or UniFFI glue. Decision for the ADR: bundle timezone data in v1 to keep wall-time gap/fold resolution identical across Rust targets and set a 500 KB optimized WASM core cap. Evidence: nlp-bench-2026-10-19.md, Bundle and WASM size; nlp-corpus/wasm-estimate and harness/measure_sizes.sh.
Author
Owner

Finding: no candidate is suitable as the parser. On the independent authored positives, chrono-node was best at 61/114 exact; it also parsed 41/160 date-shaped title traps and produced 0/15 exact recurrence rules. The corpus contains 823 cases, 160 traps, and 15,773 growing-prefix samples per benchmark run. Decision for the ADR: own a tokenizer plus small explicit rule set; retain chrono-node as a test oracle only. The 4× phone estimate is not a phone measurement, so the ADR makes target-device latency a release gate rather than claiming it already passes. Evidence: /home/kayg/Developer/calternal-research/nlp-bench-2026-10-19.md and nlp-corpus/corpus.jsonl.

Finding: no candidate is suitable as the parser. On the independent authored positives, chrono-node was best at 61/114 exact; it also parsed 41/160 date-shaped title traps and produced 0/15 exact recurrence rules. The corpus contains 823 cases, 160 traps, and 15,773 growing-prefix samples per benchmark run. Decision for the ADR: own a tokenizer plus small explicit rule set; retain chrono-node as a test oracle only. The 4× phone estimate is not a phone measurement, so the ADR makes target-device latency a release gate rather than claiming it already passes. Evidence: /home/kayg/Developer/calternal-research/nlp-bench-2026-10-19.md and nlp-corpus/corpus.jsonl.
Author
Owner

Finding: the research corpus has four deliberately ambiguous cases: “Call at 5”, “Call at 9”, “Call 5”, and the documented region-dependent “Schedule 10-3 9”. N2 now resolves the three hour cases from the local time without asking; N3 resolves the all-number date by app locale. The ADR treats these as product goldens under the settled rules instead of leaving them excluded. Evidence: corpus.jsonl rows own-0050 through own-0052 and own-ambiguous-things; decisions recorded in this issue on 2026-10-19.

Finding: the research corpus has four deliberately ambiguous cases: “Call at 5”, “Call at 9”, “Call 5”, and the documented region-dependent “Schedule 10-3 9”. N2 now resolves the three hour cases from the local time without asking; N3 resolves the all-number date by app locale. The ADR treats these as product goldens under the settled rules instead of leaving them excluded. Evidence: corpus.jsonl rows own-0050 through own-0052 and own-ambiguous-things; decisions recorded in this issue on 2026-10-19.
Author
Owner

Finished: committed and pushed branch issue/590-nlp-adr.
Head SHA: b4df9d5cd1
ADR: docs/adr/0053-task-dates-use-our-own-small-parser.md

Gate output:
ADR_LINE_COUNT=101 LIMIT=250 PASS
ADR_INDEX_LINK=PASS

The committed diff check exited 0, the worktree is clean, and the remote branch head matches. No code tests were run; this change only adds the ADR and index entry.

Finished: committed and pushed branch issue/590-nlp-adr. Head SHA: b4df9d5cd1757514d40969a22933cb42ba61f6c5 ADR: docs/adr/0053-task-dates-use-our-own-small-parser.md Gate output: ADR_LINE_COUNT=101 LIMIT=250 PASS ADR_INDEX_LINK=PASS The committed diff check exited 0, the worktree is clean, and the remote branch head matches. No code tests were run; this change only adds the ADR and index entry.
Author
Owner

Starting the TypeScript versus Rust→WASM client-engine benchmark in /home/kayg/Developer/calternal-research/wasm-bench/. Branch: none (research-only directory is not a Git checkout). Base SHA: not applicable. I will report boundary-inclusive and compute-only timings, browser/load conditions, cold start, memory and artifact sizes as the runs complete.

Starting the TypeScript versus Rust→WASM client-engine benchmark in `/home/kayg/Developer/calternal-research/wasm-bench/`. Branch: none (research-only directory is not a Git checkout). Base SHA: not applicable. I will report boundary-inclusive and compute-only timings, browser/load conditions, cold start, memory and artifact sizes as the runs complete.
Author
Owner

Start record update: the reference product base is origin/dev at 236fa2ffcdb9892102fdac15161df7fc22e1545a. There is still no working branch because this benchmark lives in the separate research directory.

Start record update: the reference product base is `origin/dev` at `236fa2ffcdb9892102fdac15161df7fc22e1545a`. There is still no working branch because this benchmark lives in the separate research directory.
Author
Owner

Build finding: the first release WASM attempt downloaded the wasm32 target and started compiling the wasm-bindgen dependencies, then stopped at the host build-script step with error: linker cc not found. No benchmark result was produced. I am adding a temporary Nix shell with the host C toolchain and will retry through the build slot.

Build finding: the first release WASM attempt downloaded the wasm32 target and started compiling the wasm-bindgen dependencies, then stopped at the host build-script step with `error: linker cc not found`. No benchmark result was produced. I am adding a temporary Nix shell with the host C toolchain and will retry through the build slot.
Author
Owner

Build finding: the Rust release crate compiled successfully, but the automatic wasm-opt validation failed on bulk-memory memory.copy and memory.fill instructions. I am disabling the default optimizer and running Binaryen 132 explicitly with its bulk-memory optimization flag at -O3, as requested. No browser measurements were produced by this attempt.

Build finding: the Rust release crate compiled successfully, but the automatic wasm-opt validation failed on bulk-memory memory.copy and memory.fill instructions. I am disabling the default optimizer and running Binaryen 132 explicitly with its bulk-memory optimization flag at -O3, as requested. No browser measurements were produced by this attempt.
Author
Owner

Measurement finding: the first headless Chromium run had date p50/p95 bins at 0 or 100 microseconds, and WebKit bins at 0, so the default page timer was too coarse for this parser. I stopped that run, discarded its partial results, and am enabling cross-origin isolation to request high-resolution browser timers before repeating all five runs.

Measurement finding: the first headless Chromium run had date p50/p95 bins at 0 or 100 microseconds, and WebKit bins at 0, so the default page timer was too coarse for this parser. I stopped that run, discarded its partial results, and am enabling cross-origin isolation to request high-resolution browser timers before repeating all five runs.
Author
Owner

Finding from five Chromium and five WebKit runs (headless Playwright, cross-origin isolated). Date samples batch each same-prefix call 64 times to resolve timer precision (5 us Chromium, 20 us WebKit). Median p50 us, TypeScript / wasm-bindgen string / shared UTF-8: Chromium 2.187 / 1.719 / 3.516; WebKit 3.750 / 2.500 / 2.813. Boundary share for the string path is 31.8% / 28.5%, and for shared UTF-8 65.1% / 40.0%. At 50k money rows (7,302,890 bytes), whole-file parse plus totals in ms: Chromium 85.39 / 160.46 / 64.88; WebKit 98.48 / 42.62 / 57.86. Thus shared memory wins in Chromium and the JS-string path wins in WebKit, while string transfer dominates Chromium WASM cost. The 1k incremental percentiles were discarded because WebKit quantized individual calls to zero; I am rerunning incremental edits in 64-call timed batches before final recommendation.

Finding from five Chromium and five WebKit runs (headless Playwright, cross-origin isolated). Date samples batch each same-prefix call 64 times to resolve timer precision (5 us Chromium, 20 us WebKit). Median p50 us, TypeScript / wasm-bindgen string / shared UTF-8: Chromium 2.187 / 1.719 / 3.516; WebKit 3.750 / 2.500 / 2.813. Boundary share for the string path is 31.8% / 28.5%, and for shared UTF-8 65.1% / 40.0%. At 50k money rows (7,302,890 bytes), whole-file parse plus totals in ms: Chromium 85.39 / 160.46 / 64.88; WebKit 98.48 / 42.62 / 57.86. Thus shared memory wins in Chromium and the JS-string path wins in WebKit, while string transfer dominates Chromium WASM cost. The 1k incremental percentiles were discarded because WebKit quantized individual calls to zero; I am rerunning incremental edits in 64-call timed batches before final recommendation.
Author
Owner

Final findings from five runs each in Chromium, WebKit and iPhone simulator Safari. Per-keystroke p50 us (TypeScript / wasm-bindgen string / shared UTF-8): Chromium 2.187 / 1.641 / 3.203; WebKit 3.125 / 2.188 / 2.813; iPhone simulator 0.937 / 0.625 / 0.937. String WASM saves under 1.3 us per call; module startup medians were 239.84 ms, 8,690.04 ms and 1,360.92 ms respectively, so keep the Composer parser in TypeScript. For a 7,302,890-byte, 50k-record money month, parse+totals medians ms (TypeScript / WASM string / shared UTF-8): Chromium 87.13 / 158.24 / 53.55; WebKit 112.02 / 51.60 / 67.10; iPhone simulator 25.14 / 16.00 / 10.20. At 10k records a WASM route is also faster in all three; Chromium and iPhone favor shared UTF-8, WebKit favors the string API. String input dominated Chromium WASM cost (80.8% boundary share at 50k). For a 50k one-row edit, medians us were Chromium 6.719 TS / 8.672 string / 6.641 shared; WebKit 7.500 / 6.562 / 6.563; iPhone 1.563 / 1.562 / 1.562. Boundary share was about 80–92%, so keep edits in TypeScript by default. All span checksums and integer total vectors matched. The iOS results are from a remote simulator, not physical iPhone hardware; Linux host load reached 56.66 during that run.

Final findings from five runs each in Chromium, WebKit and iPhone simulator Safari. Per-keystroke p50 us (TypeScript / wasm-bindgen string / shared UTF-8): Chromium 2.187 / 1.641 / 3.203; WebKit 3.125 / 2.188 / 2.813; iPhone simulator 0.937 / 0.625 / 0.937. String WASM saves under 1.3 us per call; module startup medians were 239.84 ms, 8,690.04 ms and 1,360.92 ms respectively, so keep the Composer parser in TypeScript. For a 7,302,890-byte, 50k-record money month, parse+totals medians ms (TypeScript / WASM string / shared UTF-8): Chromium 87.13 / 158.24 / 53.55; WebKit 112.02 / 51.60 / 67.10; iPhone simulator 25.14 / 16.00 / 10.20. At 10k records a WASM route is also faster in all three; Chromium and iPhone favor shared UTF-8, WebKit favors the string API. String input dominated Chromium WASM cost (80.8% boundary share at 50k). For a 50k one-row edit, medians us were Chromium 6.719 TS / 8.672 string / 6.641 shared; WebKit 7.500 / 6.562 / 6.563; iPhone 1.563 / 1.562 / 1.562. Boundary share was about 80–92%, so keep edits in TypeScript by default. All span checksums and integer total vectors matched. The iOS results are from a remote simulator, not physical iPhone hardware; Linux host load reached 56.66 during that run.
Author
Owner

Finished. Full benchmark and methods: /home/kayg/Developer/calternal-research/wasm-bench/RESULTS.md
Head SHA: not applicable (the research directory is not a Git checkout).

Gate output (verbatim):

WASM_BUILD_DONE raw_bytes=1113054 optimized_bytes=1058090
  2 passed (3.5m)
IOS_SAFARI_RESULTS_WRITTEN runs=5
RESULTS_WRITTEN browsers=chromium,webkit,ios-safari date_rows=9 money_rows=27 edit_rows=27 wasm_opt_bytes=1058090
Finished. Full benchmark and methods: /home/kayg/Developer/calternal-research/wasm-bench/RESULTS.md Head SHA: not applicable (the research directory is not a Git checkout). Gate output (verbatim): ```text WASM_BUILD_DONE raw_bytes=1113054 optimized_bytes=1058090 2 passed (3.5m) IOS_SAFARI_RESULTS_WRITTEN runs=5 RESULTS_WRITTEN browsers=chromium,webkit,ios-safari date_rows=9 money_rows=27 edit_rows=27 wasm_opt_bytes=1058090 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#590
No description provided.