News for hackers. Stuff that matters.
Re:Efficient string copying and concatenation in C by kazinator on Thursday September 12, 2019 @03:48PM (#20955621)
It's good to measure all the pieces (if you can) or get an upper-bound estimate, allocate once, then move in.

http://www.kylheku.com/cgit/txr/tree/lib.c?id=txr-225#n3897

(The mysterious wini, wref and auto_str macros here allow a C character array on the stack to be a Lisp value with a type tag, recognized and ignored by the garbage collector.)

There are no comments on this comment yet.