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:
parent
8808dda605
commit
83200a453b
17 changed files with 84 additions and 50 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue