Re:It Can Happen to You
by froh on Thursday March 04, 2021 @01:53PM
(#26346522)
printf and scanf match nicely with their format specifiers, so the serialization and deserialization can be maintained nicely in lockstep.
to avoid the quadratic overheating sttlen you can simply use fmemopen(3), which makes the temporary sscanf FILE object explicit and persistent for the whole parse, and needs just one strlen call.
to avoid the quadratic overheating sttlen you can simply use fmemopen(3), which makes the temporary sscanf FILE object explicit and persistent for the whole parse, and needs just one strlen call.
https://news.ycombinator.com/item?id=26343149