Files
vectorcraft/crates/eps
dotCooCoo 46dd113eaa EPS import: token and search read a string in place instead of copying it
`token` on a string copied everything left in the string before scanning
one object, and `search` and `anchorsearch` copied both strings before
comparing them. A program that walks a string by what each call leaves
copied the rest of it on every call. All three now read the strings in
place and release the borrow before the scanned object is checked
against the budget and before the results are pushed. Results, errors
and the operations charged against the budget are the same as before.

Walking a 512 KiB string takes 16 ms instead of 518 ms with `token` and
1.0 ms instead of 27 ms with `search` (release build on Linux under load
from other builds, median of 7 alternating runs); on a 4 KiB string the
difference is under 0.1 ms.

Tests in tests_strings.rs compare each operator with the copying code on
the same operands (stack, error and operations left after every call),
check that the results see later writes to the string, and check that
no string is copied.
2026-11-17 18:47:53 -08:00
..