Skip to content

Conversation

@kayjan
Copy link
Owner

@kayjan kayjan commented Nov 12, 2024

Description

For attribute comparison

  • Previously there was a for-loop for every attribute to compare which could be slow, and the attribute differences were added to tree_diff one at a time (for every attribute to compare)

For path comparison

  • Add suffix after with search.find_full_path instead of relying on lengthy dataframe methods

Testing

Additional notes

Checklist

I have read through the contributing guidelines and ensured that

  • I have added a descriptive title for this pull request.
  • I have followed the convention and standards, and my code is checked for style and correctness.
  • I have added test cases, and unit tests pass with 100% code coverage.
  • I have updated the documentation and code docstrings.

Checklist (for reviewer)

  • I have added label (breaking / enhancement / bug / documentation) to this pull request, if applicable.
  • I will ensure this change is captured in the CHANGELOG.md file.

@kayjan kayjan added the enhancement New feature or request label Nov 12, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: b667b02 Previous: 624500f Ratio
tests/node/test_node_benchmark.py::test_node_benchmark_width_1_depth_10 15951.354748357255 iter/sec (stddev: 0.0000037355037042374864) 15036.881711807157 iter/sec (stddev: 0.000014651181796644849) 0.94
tests/node/test_node_benchmark.py::test_node_benchmark_width_1_depth_100 653.7989445331834 iter/sec (stddev: 0.000014995754929732598) 617.9078086494857 iter/sec (stddev: 0.00008027557012531534) 0.95
tests/node/test_node_benchmark.py::test_node_benchmark_width_1_depth_1000 11.49545870093483 iter/sec (stddev: 0.00042521661225705865) 11.74360620035695 iter/sec (stddev: 0.0041793717421882755) 1.02
tests/node/test_node_benchmark.py::test_node_benchmark_width_2_depth_10 68.81418677679169 iter/sec (stddev: 0.0031649088363212108) 67.90202841386106 iter/sec (stddev: 0.002806823386236181) 0.99
tests/node/test_node_benchmark.py::test_node_benchmark_width_1_depth_10_no_assertions 22648.132944427634 iter/sec (stddev: 0.0000018292145321188504) 22500.807217007812 iter/sec (stddev: 0.000007590862008507967) 0.99
tests/node/test_node_benchmark.py::test_node_benchmark_width_1_depth_100_no_assertions 1652.2312598369492 iter/sec (stddev: 0.0000073272525977627735) 1726.4582313626418 iter/sec (stddev: 0.000012678848851225558) 1.04
tests/node/test_node_benchmark.py::test_node_benchmark_width_1_depth_1000_no_assertions 117.02303829044452 iter/sec (stddev: 0.0032111117590907317) 117.54816209747398 iter/sec (stddev: 0.003198325854272518) 1.00
tests/node/test_node_benchmark.py::test_node_benchmark_width_2_depth_10_no_assertions 93.51908486750459 iter/sec (stddev: 0.003229896262862948) 94.19110991901941 iter/sec (stddev: 0.0029674035885756617) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@kayjan kayjan changed the title Make tree diff attribute comparison faster Make tree diff comparison faster Nov 12, 2024
@kayjan kayjan enabled auto-merge November 12, 2024 17:55
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
bigtree 100% 100% 0
bigtree.binarytree 100% 100% 0
bigtree.dag 100% 100% 0
bigtree.node 100% 100% 0
bigtree.tree 100% 100% 0
bigtree.utils 100% 100% 0
Summary 100% (2379 / 2381) 100% (1002 / 1002) 0

@kayjan kayjan merged commit 813ebca into master Nov 12, 2024
6 checks passed
@kayjan kayjan deleted the feature/tree-diff-attr branch November 12, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants