Skip to content

ASV: added benchamark tests for DataFrame.to_numpy() and .values #36452

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

Merged
merged 1 commit into from
Sep 19, 2020

Conversation

hardikpnsp
Copy link
Contributor

Adds benchmarks with single dtype and mixed frames of varying sizes.
xref #34999

@jreback jreback added the Benchmark Performance (ASV) benchmarks label Sep 18, 2020
@jreback jreback added this to the 1.2 milestone Sep 18, 2020
@jreback
Copy link
Contributor

jreback commented Sep 18, 2020

can you run these so we can see (and post here) in dev mode is fine as there is nothing to compare

@hardikpnsp
Copy link
Contributor Author

@jreback, here are the benchmark results produced by asv dev. hope this is what we are looking for.

[  6.25%] ··· frame_methods.ToNumpy.time_to_numpy_mixed_tall                                      18.5±0ms
[ 12.50%] ··· frame_methods.ToNumpy.time_to_numpy_mixed_wide                                      3.97±0ms
[ 18.75%] ··· frame_methods.ToNumpy.time_to_numpy_tall                                            40.9±0μs
[ 25.00%] ··· frame_methods.ToNumpy.time_to_numpy_wide                                            95.4±0μs
[ 31.25%] ··· frame_methods.ToNumpy.time_values_mixed_tall                                        21.6±0ms
[ 37.50%] ··· frame_methods.ToNumpy.time_values_mixed_wide                                        5.70±0ms
[ 43.75%] ··· frame_methods.ToNumpy.time_values_tall                                              56.4±0μs
[ 50.00%] ··· frame_methods.ToNumpy.time_values_wide                                              86.0±0μs

@hardikpnsp
Copy link
Contributor Author

hardikpnsp commented Sep 19, 2020

This would be my first opensource contribution. I was not sure in what section of whatsnew file should I do an entry for this. Or, if I need to do it at all for benchmark tests, would appreciate some notes in that direction. Thank you.

@jreback
Copy link
Contributor

jreback commented Sep 19, 2020

thanks @hardikpnsp no whatsnew necessary for this.

@jreback jreback merged commit 51ffcdb into pandas-dev:master Sep 19, 2020
@hardikpnsp hardikpnsp deleted the asv-benchmark-frame-to-numpy branch September 20, 2020 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASV: asvs for DataFrame.values, to_numpy
2 participants