-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
ENH: sortlevel, docs, vbench for #720 #725
Conversation
Boo. it's actually slower now. after:
before:
here's the line timing: before (faster):
after (slower)
hmm. most perplexing. deeper down the rabbit hole:
i think the answer here is not to compress the group labels in the secondly, i'm questioning again my decision to store the tuples in the MultiIndex. The take operation on the values themselves is not all that fast:
but faster than the multiindex construction
thus, can you please make the following modifications
then you can call
inside run the above benchmarks to ensure faster and then i'll merge this |
Got it. Awesome analysis. |
Did the vbench catch this btw? If not maybe use my example for the vbench instead |
Something broke in the vbench running before, results were empty. Will make sure vbench does catch it, if not existing test, then one above. |
I thought I was going crazy, but i'm not: there is a failure in test_sortlevel in test_index, that fails only sometimes, probably due to the random.shuffle(tuples) producing different permutations. I'll isolate the failure; but this is not related to changes you outlined above. |
before or after the changes above? |
Before. I think it's because indexer = _indexer_from_factorized((primary,) + tuple(labels), if we have a permutation of the labels, we don't permute levshape accordingly |
oh sorry i meant before those commits. yes that is definitely the problem. just have to do the same reordering song and dance with self.levshape as self.labels |
Cool. B/c of randomness of test, it wasn't always caught. Wild goose chase. Should be closing this out soon. |
Yeah-- if the index being used were made bigger it would probably fail every time |
still need to make sure vbench catches improvement, will let you know in a few mins |
#720, #719