Closed bobfang1992 closed 1 year ago
pytomlpp
is slightly faster than rtoml
when I run this same benchmark on my own machine. I suspect things like CPU arch, compiler, compiler version, optimization level etc has a lot to do with it, so there's enough noise in the data that I don't think it's worth losing any sleep over, heh.
Plus: do you think there is anything I should support in pytomlpp?
Nah, I think the minimal dict
-based API is fine as-is. I implemented those things because there's no built-in/easy way to do them in C++, but in python you've already got the package ecosystem out-of-the-box so users can trivially do those conversions without needing any support from you :)
It would be different if a user needed to convert TOML to JSON/YAML fast, of course, because then it'd need to be done with native code, but I suspect that's a pretty niche situation that you don't need to worry about.
Hi,
I recently rerun the benchmark in pytomlpp and here is the result:
Understand this is not a competition but just want to raise awareness of this if you care about it.
Plus: do you think there is anything I should support in pytomlpp? I see you added quite some features (e.g. json/yaml formatter etc.). And I'm wondering if you have any preference on supporting them in the python API as well.
Thanks!