ludic.ui: string matching compares in place - at_alias, lk_in, colours and every s[a..b] == p made a string per position tried, per rule, per element, per frame (a benchmark page: ~3 MB -> 256 KB a frame)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-27 23:27:02 +03:00
parent 8808dda605
commit 83200a453b
17 changed files with 84 additions and 50 deletions

View file

@ -84,7 +84,7 @@ export function ui_err(ui_st: mut UiState, msg0: string) -> void {
function ui_has(s: string, part: string) -> bool {
let n = len(part)
for i in 0 .. len(s) - n + 1 {
if s[i..i + n] == part { return true }
if sat(s, i, part) { return true }
}
return false
}