I made a little catalog program and it slows to mud after editing a bunch of titles. Lots of string slicing and reassignment. I assume garbage collection has arrived to collect *me*.
Is the normal answer “use fixed fields,” or is there a less drastic pattern?
BASIC V2 strings ate my afternoon
3 replies · opened AUG 11 ago
Fixed-length fields or numeric arrays with a separate string table will make life calmer. Also avoid repeatedly building strings one character at a time. That creates a lot of temporary strings.
For a disk catalog, fixed fields are not drastic. They are freedom wearing an ugly hat.
Converted the filename field to a fixed 16 chars. It is much faster and my code is somehow shorter. I resent this success.
Want to add to this transmission?
SIGN IN TO REPLY →