-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve performance by 2x #64
Conversation
Codecov Report
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
+ Coverage 75% 75.39% +0.39%
==========================================
Files 11 11
Lines 1264 1268 +4
==========================================
+ Hits 948 956 +8
+ Misses 316 312 -4
Continue to review full report at Codecov.
|
Neat! Thanks for taking the time to do this. I noticed a bunch of the |
the |
I can confirm the speedup on my small document from 25 ms to 11 ms. However, this is a bit breaking for me since I'm doing things like
which is passed as a constructor to
(This should not be seen as an indication that named arguments are faster. The differences are within measurement noise.) |
the main reason for changing to positional arguments was that i could revert this change if you like, but i'd suggest keeping it as not all type instabilities have been eradicated. in my hands the switch is also roughly 10% faster, but that could be within the noise as you say. |
It's no big deal for me to adapt my code, so if the change does add some value I'm fine with it. |
It would be nice to get this moving, and a new release of the package. |
is there anything i need to do on my end? i've been using this PR in production for the last month and it has been fine. |
This looks good to me, but I'm not an official maintainer here. Actually, I don't see a maintainer - @benjward @bicycle1885 do you know who's on it? |
Instead of converting those structs to use a concrete type, |
Thanks for merging this. Any chance to get a new release as well? |
a speed test on my test data set with this PR is 2.979 sec. on master it is 5.934 sec. with PyYAML it is 4.071 sec for the wrapper around the libyaml C code, or 24.03 sec for the pure python code.
worth noting that C code which implements a custom parser that is specific to this test set's document structure can read this file in 0.25 sec. so there is a lot of overhead for generality.