Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Conversation

@ndawe
Copy link
Member

@ndawe ndawe commented Apr 28, 2015

Don't bother remembering and reverting to original branch statuses, and avoid the slow SetBranchStatus().

Tested on a tree with 2256 branches.

Before:

>>> min(timeit.Timer("rnp.tree2array(t, branches=branches)", setup=setup).repeat(10, 1))
14.4979131222

After:

>>> min(timeit.Timer("rnp.tree2array(t, branches=branches)", setup=setup).repeat(10, 1))
0.362231016159

That's 14.5 seconds reduced to 0.4 seconds...

…ember and

revert to original branch status, and avoid the slow SetBranchStatus
@ndawe ndawe changed the title Huge speed improvement for trees with many branches [MRG] Huge speed improvement for trees with many branches Apr 28, 2015
ndawe added a commit that referenced this pull request Apr 28, 2015
[MRG] Huge speed improvement for trees with many branches
@ndawe ndawe merged commit 4372a22 into scikit-hep:master Apr 28, 2015
@ndawe ndawe mentioned this pull request May 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant