[OT] parsing with sscanf is accidentally quadratic due to strlen

Kagamin spam at here.lot
Thu Mar 4 08:15:00 UTC 2021


On Wednesday, 3 March 2021 at 16:58:27 UTC, H. S. Teoh wrote:
> Fortunately in D slices eliminate the strlen problem, and 
> slice-based std.array.split, et al, are generally better for 
> simple parsing tasks IMO than *scanf functions.

It's used for number parsing, which isn't easy to replace in C: 
https://github.com/biojppm/rapidyaml/issues/40


More information about the Digitalmars-d mailing list