Skip to content

Quick shift fixes #6747

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 2 commits into from
Mar 31, 2014
Merged

Quick shift fixes #6747

merged 2 commits into from
Mar 31, 2014

Conversation

dalejung
Copy link
Contributor

Adjustments to the quick fix PR.

https://gist.github.com/dalejung/9731798#file-vb_suite-log

-------------------------------------------------------------------------------
Test name                                    | head[ms] | base[ms] |  ratio   |
-------------------------------------------------------------------------------
frame_shift_c_order_axis1                    |  14.4524 |  52.8037 |   0.2737 |
frame_shift_c_order_axis0                    |  16.9516 |  46.5320 |   0.3643 |
frame_shift_axis0                            |  15.2656 |  16.3440 |   0.9340 |
frame_shift_axis1                            |  22.2600 |  22.0567 |   1.0092 |

Note, that the speed up was really in sending a C order array to np.take. You'll notice that master is slow for frame_shift_c_order_ which are tests where the block.values is c_contiguous. Thus current master always transposes.

The original example had it's speed up because it np.rolled df.values which is C ordered (fast) while the .blocks were were (slow).

@jreback
Copy link
Contributor

jreback commented Mar 31, 2014

good catch on this
thanks!

jreback added a commit that referenced this pull request Mar 31, 2014
@jreback jreback merged commit a44c304 into pandas-dev:master Mar 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants