-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Enhancingperf documentation updates #24807
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
Comments
There are certainly some updates that can be made in the doc, so sure feel free to submit a PR. At the very least the references to With that said I'm not sure the benchmark you've provided is all that relevant. Cython looping will definitely be much faster than iteration in Python. IIUC your benchmark is only on a very small DataFrame (1,000 records) so differences may not be as apparent there but certainly on larger datasets Cython performance will be much better |
@WillAyd - I would like to work on this, please. It will be my first contribution to open source. |
As suggested in pandas-dev#24807 (comment) Replace `.values` with `.to_numpy()` in the benchmark demonstration code.
* DOC: Replace .values with .to_numpy() As suggested in #24807 (comment) Replace `.values` with `.to_numpy()` in the benchmark demonstration code.
Closed via #26313 |
I was going through the
enhancingperf
document recently and realised that the saying:doesn't seem to be true any more. Specifically I can implement
apply_integrate_f
as:and get basically the same performance:
apply_integrate_f
takes 1.27 msapply_integrate_f_wrap
checks disabled takes 856 µsapply_integrate_pyf
version takes 1.13 ms(all the above run on my computer using Jupyter
%timeit
, i.e. mean of 7 runs)This feels like a much nicer way of elding the creation of all those
Series
objects.I could submit a pull-request if it seems worthwhile updating this document —
git blame
says it's mostly been receiving cosmetic changes for 6 years or so.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: