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

@ -22,7 +22,7 @@ function lc_note(ui_st: mut UiState, key: string, names: []string, acts: []UiAct
}
function lc_mine(key: string, screen: string) -> bool {
let n = len(screen)
return key == screen or (len(key) > n and key[0..n] == screen and key[n] == 47)
return key == screen or (len(key) > n and sat(key, 0, screen) and key[n] == 47)
}
# the screen's mounts and unmounts since its last frame; other screens' records are kept
function lc_run(ui_st: mut UiState, screen: string) -> void {