Hacker News new | ask | show | jobs
by lylejantzi3rd 1073 days ago
> But this implementation of a reduced feature set version of .ini file parsing does not convince me that I should write my own parser instead of using one that implements a more full feature set

A performance comparison on a large ini file might.

You may want to take the time to watch this video[0]. In it, Andreas Fredriksson walks though his reasoning for writing his own parser instead of using the standard json parser.

[0]: https://vimeo.com/644068002

1 comments

Performance comparison of this code might not, however, as fgetc() based parsing is not efficient. (Each call takes a lock in the FILE object).