Skip to content

Optimizations with performance metrics #12

Description

@ccgargantua

To be honest, the parser definitely doesn't perform badly. Using some "good enough" benchmarks, I have discovered that the ini file parser performs roughly the same as or better than python's built-in configparser for ini files up to 30KB in size on my ThinkPad. That's pretty big, and the obvious reason for the cutoff is that our parser performs a linear search across sections and keys on query, as opposed to a hashed dictionary data structure that python uses regardless of the size of the ini file. Our solution is simply more cache-friendly than python's on smaller files. Arguably, this is hardly an issue at all, and this issue is not very urgent for that reason.

To resolve this issue, I would like someone to look over the code and apply micro optimizations where they can fit without sacrificing simplicity and readability. If you do this, provide some performance metrics on a large ini file compared to those of a simple python script that parses the same file for the same values. If it's substantially faster under -O0 through -O2, then I would consider it a resolution to this issue and a big step towards v1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions