|
939 | 939 | {"id":"bd-2g7oyh.362","title":"[perf] strcasecmp/strncasecmp ABI: fused SWAR case-fold compare replaces 3-pass/byte-loop (3.3-3.9x self, beats glibc)","status":"closed","priority":1,"issue_type":"task","created_at":"2026-06-12T23:45:34.929769087Z","created_by":"ubuntu","updated_at":"2026-06-12T23:46:07.614121148Z","closed_at":"2026-06-12T23:46:07.614020498Z","close_reason":"Shipped 24c9b5a2. strcasecmp (3-pass: 2 full scan_c_string + core SIMD compare, eager even on early mismatch) + strncasecmp (byte tolower loop) -> single fused scan_strcasecmp (case-folded 8-byte word compare, early exit). NEW swar_ascii_lower: branchless SWAR ASCII lowercase, borrow-safe via (w|HIGHS) per-byte guard + (!w&HIGHS) ascii mask, folds only A-Z. Page-guarded dual-pointer reads (wide_read_within_page); strcasecmp keeps exact clamped-slice semantics on rare repair path. Measured (rch median ns/op, equal-mod-case): self 1.93x@16B/3.34x@64B/3.86x@16KB (>=2.0 all n>=64); matches-beats glibc every size (1.0-2.95x). Parity: (1) swar_ascii_lower==to_ascii_lowercase ALL 256 bytes x 8 lanes; (2) 100k+ pairs sign-match glibc strcasecmp/strncasecmp; (3) guard-page over-read test. Ninth ABI string-vein win (.352/.354/.355/.356/.358/.359/.360/.361/.362).","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.362","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-12T23:45:34.929769087Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
940 | 940 | {"id":"bd-2g7oyh.363","title":"[perf] strncpy/stpncpy ABI: SWAR scan + wide copy + wide pad replaces byte loop (4.4-6.3x self, beats glibc)","status":"closed","priority":1,"issue_type":"task","created_at":"2026-06-13T00:00:36.393266428Z","created_by":"ubuntu","updated_at":"2026-06-13T00:01:05.789971109Z","closed_at":"2026-06-13T00:01:05.789859157Z","close_reason":"Shipped faffed37. strncpy byte-by-byte copy+pad loop -> composition of shipped/gated primitives: scan_c_string (SWAR find NUL) + raw_memcpy_bytes (wide u128 copy prefix, clamped to dst bound) + raw_memset_bytes (wide NUL pad). Byte-identical incl membrane-repair clamping. stpncpy delegates to strncpy+strnlen (inherits). Measured (rch median ns/op, copy-heavy strlen==n): self 4.39x@64B/5.60x@256B/6.28x@65536B (>=2.0 all n>=64); matches-beats glibc every size (1.0-2.76x). Pad-heavy already fast (byte pad lowered to memset). Parity: conformance_diff_strncpy.rs 2400 cases (srclen0-300 x n-straddling-NUL x src/dst align0-7) byte-identical dst buffers + stpncpy end-offset vs glibc; composed primitives independently gated. Tenth ABI string-vein win (.352/.354/.355/.356/.358/.359/.360/.361/.362/.363).","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.363","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T00:00:36.393266428Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
941 | 941 | {"id":"bd-2g7oyh.364","title":"[perf] wcschr ABI: portable-SIMD wide find replaces scalar element loop (3-6x self, beats glibc)","status":"closed","priority":1,"issue_type":"task","created_at":"2026-06-13T00:32:34.930623250Z","created_by":"ubuntu","updated_at":"2026-06-13T00:33:46.042695015Z","closed_at":"2026-06-13T00:33:46.042570359Z","close_reason":"Shipped d08c6586. wcschr common path scalar u32-element loop -> wide_find_or_nul_simd (Simd<u32,8>, simd_eq(c)|simd_eq(0) per 32-byte window, aligned-to-32 so loads stay in-page, c=0 returns terminator; repair path keeps scalar). Enables portable_simd in abi crate. Measured (rch median ns/op): self 3.09x@64/4.98x@256/5.92x@4096/5.11x@65536 (>=2.0 n>=64); beats glibc wcschr every size (1.48-3.51x). ⚠️u64-SWAR wide compare REJECTED first (0.74-1.07x, page-guard overhead not amortized over 2 elements) -> portable-SIMD 8-lane is the correct wide lever. Parity: conformance_diff_wcschr.rs 3840+ cases byte-identical to glibc + guard-page test; conformance_diff_wcscmp.rs differential gate added. Eleventh ABI string-vein win (.352/.354/.355/.356/.358/.359/.360/.361/.362/.363/.364). NEXT: wcsrchr/wcscmp/wcsncmp via same portable-SIMD pattern.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.364","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T00:32:34.930623250Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
942 | | -{"id":"bd-2g7oyh.365","title":"[perf] wcsrchr ABI portable-SIMD c-or-NUL reverse result","description":"Profile-backed follow-on after bd-2g7oyh.364: the public ABI wcschr path now uses portable-SIMD c-or-NUL scanning, but wcsrchr in crates/frankenlibc-abi/src/wchar_abi.rs still walks scalar one wchar_t at a time while tracking the last match. One lever: reuse the page-contained u32x8 c-or-NUL vector scan as a chunk filter for strict unbounded wcsrchr, resolving each flagged window scalar in order and preserving the last match before the first NUL; keep hardened bounded repair path scalar. Baseline via RCH ABI microbench before production edit; proof via glibc differential offsets, NUL target behavior, alignment variation, high wchar values, guard-page no-overread, ordering/tie-breaking, FP/RNG N/A, golden sha256; post RCH bench must Score>=2.0 before keeping.","status":"in_progress","priority":1,"issue_type":"task","assignee":"BoldFalcon","created_at":"2026-06-13T00:36:01.181914541Z","created_by":"ubuntu","updated_at":"2026-06-13T00:36:01.181914541Z","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"labels":["abi","no-gaps","perf","string","wide"],"dependencies":[{"issue_id":"bd-2g7oyh.365","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T00:36:01.181914541Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
| 942 | +{"id":"bd-2g7oyh.365","title":"[perf] wcsrchr ABI portable-SIMD c-or-NUL reverse result","description":"Profile-backed follow-on after bd-2g7oyh.364: the public ABI wcschr path now uses portable-SIMD c-or-NUL scanning, but wcsrchr in crates/frankenlibc-abi/src/wchar_abi.rs still walks scalar one wchar_t at a time while tracking the last match. One lever: reuse the page-contained u32x8 c-or-NUL vector scan as a chunk filter for strict unbounded wcsrchr, resolving each flagged window scalar in order and preserving the last match before the first NUL; keep hardened bounded repair path scalar. Baseline via RCH ABI microbench before production edit; proof via glibc differential offsets, NUL target behavior, alignment variation, high wchar values, guard-page no-overread, ordering/tie-breaking, FP/RNG N/A, golden sha256; post RCH bench must Score>=2.0 before keeping.","status":"closed","priority":1,"issue_type":"task","assignee":"BoldFalcon","created_at":"2026-06-13T00:36:01.181914541Z","created_by":"ubuntu","updated_at":"2026-06-13T01:16:35.933014548Z","closed_at":"2026-06-13T01:16:35.932909319Z","close_reason":"KEPT: wcsrchr strict/unbounded uses portable-SIMD wide_last_before_nul_simd already present in current HEAD; closeout proof committed in fc6acad2. Baseline pre-lever RCH vmi1153651: 4096 old 2733.7ns / ABI 3503.7ns (0.78x), 65536 old 44219.7ns / ABI 51201.0ns (0.86x). Post RCH vmi1227854 focused gate: 4096 old 1319.3ns / ABI 199.0ns (6.63x), 65536 old 21039.5ns / ABI 2619.7ns (8.03x). Proof RCH conformance_diff_wcsrchr passed 3/3 with golden sha256 3fb98cbeed206dcbbf6fa27007b4ac83bc76438ae30817652b8a07a340b54f77; ordering/tie-breaking/c==0/guard-page preserved; FP/RNG N/A. Score 10.0.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"labels":["abi","no-gaps","perf","string","wide"],"dependencies":[{"issue_id":"bd-2g7oyh.365","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T00:36:01.181914541Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
943 | 943 | {"id":"bd-2g7oyh.366","title":"[perf] wcscmp/wcsncmp ABI: portable-SIMD wide compare replaces scalar element loop (2-2.5x self, closes glibc gap)","status":"closed","priority":1,"issue_type":"task","created_at":"2026-06-13T00:43:24.595877467Z","created_by":"ubuntu","updated_at":"2026-06-13T00:44:15.457631075Z","closed_at":"2026-06-13T00:44:15.457541896Z","close_reason":"Shipped 3176c1f9. wcscmp/wcsncmp scalar u32-element loop -> scan_wcscmp_simd (Simd<u32,8> 8-lane; equal+NUL-free 32-byte window advances 8, else element-resolve; dual-pointer page-guarded wide32_read_within_page (addr&0xFFF)<=4064; raw [u32;8] array loads). 8 lanes amortise the page-guard cost (the 2-lane u64-SWAR lost last session). Measured (rch median ns/op, equal full scan): self 2.48x@64/2.34x@256/2.53x@1024/2.03x@65536 (>=2.0 for 5/7 sizes; 16=1.66x, 4096=1.92x just under); beats glibc <=1024 + 16384 (1.19-2.28x), closes gap at large sizes (old 0.44x->new 0.86x @ 4096; portable-SIMD vs hand-AVX2 ceiling). Parity: conformance_diff_wcscmp.rs 50k+ sign-match glibc + guard-page test. Twelfth ABI string-vein win (.352-.364 + .366). NEXT: wcscasecmp (SIMD + wide case-fold); wcsrchr in progress by peer BoldFalcon.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.366","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T00:43:24.595877467Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
944 | 944 | {"id":"bd-2g7oyh.367","title":"[perf] wcscasecmp/wcsncasecmp ABI: portable-SIMD ASCII-folded wide compare (2.3-5.2x self, beats glibc)","status":"closed","priority":1,"issue_type":"task","created_at":"2026-06-13T00:58:34.518370157Z","created_by":"ubuntu","updated_at":"2026-06-13T00:59:15.033117838Z","closed_at":"2026-06-13T00:59:15.033029290Z","close_reason":"Shipped 8fc7d5d7. wcscasecmp/wcsncasecmp scalar abi_towlower(ASCII-only) element loop -> scan_wcscasecmp_simd (Simd<u32,8>; wide_ascii_lower_simd = simd_ge(0x41)&simd_le(0x5A) then select+0x20 — SIMD lanes independent so NO borrow guard needed unlike narrow SWAR; folded-equal+NUL-free window advances 8 else element-resolve returning towlower(a)-towlower(b) like glibc wint_t; dual-pointer page-guarded; raw [u32;8] loads). Measured (rch median ns/op, equal-mod-case): self 2.34x@16/4.34x@64/5.15x@256/4.93x@65536 (>=2.0 EVERY size); matches-beats glibc every size (1.0-2.67x). Parity: conformance_diff_wcscasecmp.rs 40k+ sign-match glibc + guard-page. Thirteenth ABI string-vein win (.352-.367 minus peer wcsrchr). NEXT: wcsrchr (peer BoldFalcon) or wcsnlen/wcsxfrm/wcsspn if scalar.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.367","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T00:58:34.518370157Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]} |
945 | 945 | {"id":"bd-2g7oyh.37","title":"[perf] malloc lifecycle trace prefix fast path","description":"Profile-backed allocator target after commit b67706fc. Current source is unchanged from the kept 33989f35 allocator state; fresh RCH post-commit broad profile on vmi1227854 measured malloc_free_64 as the largest clean residual broad-bench gap: FrankenLibC p50=177.986ns p95=221.535ns p99=306.625ns mean=185.595; host glibc p50=3.571ns. Focused current-source baseline from bd-2g7oyh.36 before its rejected source edit: vmi1227854 malloc_free_64 p50=166.312ns p95=199.002ns p99=546.168ns mean=175.132; host p50=4.441ns.\\n\\nCandidate lever: one safe-Rust allocator.rs lifecycle formatting lever only. lifecycle_trace_id runs for every allocator lifecycle record and still constructs the hot malloc/free/size_class_certificate prefixes by pushing TRACE_ID_PREFIX, symbol, separator, then hex. Add exact static-prefix fast paths for the hot symbols, preserving the generic fallback for all other symbols and preserving the 16-digit lowercase hex suffix.\\n\\nRequired proof: focused RCH baseline before edit; pre/post lifecycle_trace_id/golden SHA256 unchanged (hot-cycle lifecycle SHA256 01df8806e2bfd0fda041e153ec61ec4737ad2d3cb1ce22050a2e35bab1688455 plus lifecycle_trace_id test hash); isomorphism proof for record order, decision ids, trace ids, detail bytes, counters, allocation/free tie-breaking, FP/RNG N/A; RCH post-bench and confirmation if noisy; RCH allocator tests/check/clippy; touched-file rustfmt/diff-check; one lever only; close only if Score>=2.0, otherwise restore source and close rejected.","status":"closed","priority":1,"issue_type":"task","assignee":"MossyFern","created_at":"2026-06-03T10:17:32.305686833Z","created_by":"MossyFern","updated_at":"2026-06-03T10:33:45.886922492Z","closed_at":"2026-06-03T10:33:45.886834145Z","close_reason":"Rejected: static trace-prefix candidate failed the RCH real-win gate. Baseline vmi1153651 malloc_free_64 p50 368.140ns p95 416.938ns p99 528.365ns mean 373.502ns; first post p50 364.070ns p95 537.303ns p99 681.000ns mean 369.638ns; confirmation p50 398.683ns p95 2635.527ns p99 7603.309ns mean 725.463ns. Golden SHA256 unchanged 01df8806e2bfd0fda041e153ec61ec4737ad2d3cb1ce22050a2e35bab1688455; source restored, no allocator.rs change retained.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"labels":["allocator","malloc","no-gaps","perf"],"dependencies":[{"issue_id":"bd-2g7oyh.37","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-03T10:17:32.305686833Z","created_by":"MossyFern","metadata":"{}","thread_id":""}]} |
|
0 commit comments