Closed dumblob closed 9 years ago
The current parsing is meant to be efficient, but without sacrificing simplicity. Dates, for instance, are not interpreted during header parsing. For now at least, squirting out a small performance boost is much less important then keeping things simple and maintainable.
If the parsing ever become a bottleneck, then it can be improved. But I don't want to spend time on preemptive optimizations. Of course, you can always do it yourself and post the patch here :)
Yes, lots of minor improvements can be done, but this one kinda punched me in my face as I somehow felt it more significant than all the other ones :wink:
Of course, you can always do it yourself and post the patch here :)
Sure. That reminds me of my question https://github.com/daokoder/dao-modules/issues/39#issuecomment-89608668 about pull requests.
Sure. That reminds me of my question #39 (comment) about pull requests.
Which reminds me of another question #39 about using Git.
Closing because it's not significant and I don't intend to do it.
Because header parsing will be executed very often, the O(n^2) complexity (for all days/months call
strncmp()
consequently) should be reduced to O(n) (andstrncmp()
avoided) e.g. by using gperf-generated perfect hash matching (btw it's already used for Dao language parsing).