SYSTEM ONLINE *** WELCOME, TRAVELER *** 38911 BASIC BYTES FREE

BASIC V2 strings ate my afternoon

3 replies · opened AUG 11 ago

ORIGINAL TRANSMISSION
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?
REPLY #1
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.
REPLY #2
For a disk catalog, fixed fields are not drastic. They are freedom wearing an ugly hat.
REPLY #3
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 →