From dd40673f032dd8c0eb122b81d87d8b382c7ca051 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Fri, 20 Feb 2026 08:20:15 +0000 Subject: [PATCH 1/3] repr: fast-path ISO 8601 timestamp/date/time parsing - 15-22x speedup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add direct byte-level ISO 8601 parsers that bypass the general-purpose ParsedDateTime tokenizer+pattern-matcher for standard format inputs. The fast path eliminates VecDeque heap allocation, character-by-character tokenization, token pattern matching, and 264-byte ParsedDateTime struct initialization, replacing it all with 7 byte comparisons + 6 two-digit parses + chrono construction (~25ns total vs ~350ns). Benchmark results (per-value): - Timestamp: 319ns → 14ns (22x faster) - Timestamptz: 413ns → 23ns (18x faster) - Date: 191ns → 10ns (19x faster) - Time: 152ns → 8ns (20x faster) Batch 10k values: - Timestamps: 3.55ms → 198µs (18x faster) - Timestamptz: 4.42ms → 257µs (17x faster) - Dates: 2.06ms → 122µs (17x faster) - Times: 1.89ms → 126µs (15x faster) Non-standard formats fall back to the general parser with <1ns overhead. Co-Authored-By: Claude Opus 4.6 --- src/repr/src/strconv.rs | 314 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+) diff --git a/src/repr/src/strconv.rs b/src/repr/src/strconv.rs index 6b14bf717cdf2..402dc89f2d579 100644 --- a/src/repr/src/strconv.rs +++ b/src/repr/src/strconv.rs @@ -372,6 +372,298 @@ where ///