Skip to content

Conversation

@indietyp
Copy link
Member

🌟 What is the purpose of this PR?

Add an Administrative Reduction pass to the MIR optimizer that eliminates unnecessary function call overhead by inlining trivial thunks and forwarding closures.

🔍 What does this change?

  • Implements a new AdministrativeReduction global transform pass that identifies and inlines:
    • Trivial thunks: Single-block functions with only trivial statements that immediately return a value
    • Forwarding closures: Functions that perform trivial setup then delegate to another function
  • Adds a call-graph based traversal that processes functions in post-order (callees before callers)
  • Introduces DepthFirstForestPostOrder algorithm for complete graph traversal
  • Adds support for tracking closure values and resolving indirect function calls
  • Includes comprehensive test suite with various inlining scenarios

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

  • Unit tests for classification of reducible functions
  • Integration tests for various inlining scenarios (thunks, closures, indirect calls)
  • Snapshot tests to verify correct transformation behavior
  • Test cases for edge cases like self-recursion

@vercel vercel bot temporarily deployed to Preview – petrinaut December 29, 2025 21:42 Inactive
@cursor
Copy link

cursor bot commented Dec 29, 2025

PR Summary

Implements a global MIR optimization to eliminate administrative call overhead and adds supporting infrastructure.

  • New pass: AdministrativeReduction (pass/transform/administrative_reduction/*) implementing GlobalTransformPass, inlining trivial thunks and forwarding closures using call-graph postorder; adds compiletest suite and comprehensive UI/snapshot tests
  • Call graph: Extends pass/analysis/callgraph to implement DirectedGraph/Successors/Traverse, add CallKindFilter, and provide analyze(_in) helpers
  • Graph traversal: Adds DepthFirstForestPostOrder iterator and Traverse::depth_first_forest_post_order; fixes size_hint in postorder DFS
  • MIR utilities: ArgVec for Apply.arguments, builder helpers (closure, call), Place::SYNTHETIC, FieldIndex::{FN_PTR, ENV}
  • Pass framework: New GlobalTransformPass trait; Changed gains bit-or semantics
  • Allocator/heap: Add try_allocate_slice_uninit and infallible allocate_slice_uninit to bump allocators; forwarders in Heap/Scratch
  • ID/collections: IdSlice::{as_raw,as_raw_mut}, IdVec::extend_from_slice, Extend impl, FromIteratorIn
  • Bitset: DenseBitSet::first_unset with tests
  • Compiletest: New suite mir/pass/transform/administrative-reduction wired into registry and outputs (SVG optional)

Written by Cursor Bugbot for commit c680dde. This will update automatically on new commits. Configure here.

Copy link
Member Author

indietyp commented Dec 29, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 88.23529% with 138 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.36%. Comparing base (75ba45f) to head (c680dde).

Files with missing lines Patch % Lines
...ocal/hashql/mir/src/pass/analysis/callgraph/mod.rs 52.38% 27 Missing and 3 partials ⚠️
libs/@local/hashql/core/src/heap/bump.rs 0.00% 19 Missing ⚠️
libs/@local/hashql/core/src/heap/allocator.rs 0.00% 18 Missing ⚠️
...pass/transform/administrative_reduction/visitor.rs 89.80% 7 Missing and 9 partials ⚠️
libs/@local/hashql/core/src/id/vec.rs 0.00% 14 Missing ⚠️
...ass/transform/administrative_reduction/disjoint.rs 68.75% 8 Missing and 2 partials ⚠️
...rc/pass/transform/administrative_reduction/kind.rs 85.45% 4 Missing and 4 partials ⚠️
libs/@local/hashql/core/src/heap/mod.rs 0.00% 6 Missing ⚠️
libs/@local/hashql/core/src/heap/scratch.rs 0.00% 6 Missing ⚠️
...src/pass/transform/administrative_reduction/mod.rs 95.00% 6 Missing ⚠️
... and 2 more
Additional details and impacted files
@@                               Coverage Diff                                @@
##           bm/be-262-hashql-use-heap-to-store-interners    #8227      +/-   ##
================================================================================
+ Coverage                                         60.04%   60.36%   +0.32%     
================================================================================
  Files                                              1054     1060       +6     
  Lines                                            106576   107742    +1166     
  Branches                                           4434     4478      +44     
================================================================================
+ Hits                                              63989    65039    +1050     
- Misses                                            41865    41963      +98     
- Partials                                            722      740      +18     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.hash-graph-sdk 10.88% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 2.89% <ø> (ø)
rust.hashql-ast 87.25% <ø> (ø)
rust.hashql-compiletest 46.65% <ø> (ø)
rust.hashql-core 81.75% <60.36%> (-0.18%) ⬇️
rust.hashql-eval 68.54% <ø> (ø)
rust.hashql-hir 89.10% <ø> (ø)
rust.hashql-mir 89.12% <92.76%> (+0.61%) ⬆️
rust.hashql-syntax-jexpr 94.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@augmentcode
Copy link

augmentcode bot commented Dec 29, 2025

🤖 Augment PR Summary

Summary: This PR introduces an Administrative Reduction optimization pass for HashQL MIR to remove avoidable call/closure indirection by inlining trivial wrappers.

Changes:

  • Adds a new global MIR transform pass (AdministrativeReduction) that classifies bodies as TrivialThunk or ForwardingClosure and inlines them at call sites.
  • Builds and traverses a call graph in callee-before-caller order using a new full-graph DFS postorder iterator (DepthFirstForestPostOrder).
  • Extends call graph infrastructure to implement graph traversal traits and support filtered edge collection.
  • Adds MIR utilities to support the pass: closure/arg helpers, synthetic places, field indices, and local-offsetting support during inlining.
  • Enhances core utilities (bitsets, id slices/vectors, bump allocation) needed by the new pass.
  • Adds compiletest + MIR UI/snapshot tests covering thunks, forwarding closures, indirect calls, and recursion edges.

Technical Notes: The pass runs as a whole-program transform over DefIdSlice<Body>, processes functions postorder, and performs local fixpoint iteration within blocks to fully reduce newly spliced statements.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 29, 2025

CodSpeed Performance Report

Merging #8227 will not alter performance

Comparing bm/be-261-hashql-mir-administrative-reduction-pass (c680dde) with bm/be-262-hashql-use-heap-to-store-interners (75ba45f)

Summary

✅ 29 untouched

@vercel vercel bot temporarily deployed to Preview – petrinaut December 30, 2025 15:07 Inactive
@graphite-app graphite-app bot requested review from a team December 30, 2025 15:22
@github-actions
Copy link
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$24.5 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{lightgreen}-36.460 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{gray}-2.030 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$11.6 \mathrm{ms} \pm 74.1 \mathrm{μs}\left({\color{gray}-3.254 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$38.2 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}-0.314 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$11.9 \mathrm{ms} \pm 61.0 \mathrm{μs}\left({\color{gray}-3.006 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$20.7 \mathrm{ms} \pm 112 \mathrm{μs}\left({\color{gray}-1.433 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$25.8 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{lightgreen}-39.531 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.00 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{lightgreen}-84.902 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$10.8 \mathrm{ms} \pm 60.6 \mathrm{μs}\left({\color{lightgreen}-64.063 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$2.99 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}-1.506 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.34 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{gray}1.52 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$2.60 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{gray}-1.088 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.32 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.82 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{gray}0.458 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.33 \mathrm{ms} \pm 17.9 \mathrm{μs}\left({\color{gray}1.45 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$3.60 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-0.235 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.70 \mathrm{ms} \pm 11.4 \mathrm{μs}\left({\color{gray}-0.664 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.18 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}-0.912 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.08 \mathrm{ms} \pm 11.3 \mathrm{μs}\left({\color{gray}3.96 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.04 \mathrm{ms} \pm 8.46 \mathrm{μs}\left({\color{gray}3.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.12 \mathrm{ms} \pm 8.40 \mathrm{μs}\left({\color{gray}2.59 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.28 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{red}7.12 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.16 \mathrm{ms} \pm 8.79 \mathrm{μs}\left({\color{gray}3.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.37 \mathrm{ms} \pm 20.7 \mathrm{μs}\left({\color{red}7.63 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.31 \mathrm{ms} \pm 8.86 \mathrm{μs}\left({\color{gray}0.683 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.11 \mathrm{ms} \pm 6.81 \mathrm{μs}\left({\color{red}5.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.21 \mathrm{ms} \pm 8.07 \mathrm{μs}\left({\color{gray}4.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$2.61 \mathrm{ms} \pm 12.3 \mathrm{μs}\left({\color{gray}1.87 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.26 \mathrm{ms} \pm 9.23 \mathrm{μs}\left({\color{gray}3.71 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$2.44 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{gray}3.03 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$2.57 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{gray}4.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.24 \mathrm{ms} \pm 6.90 \mathrm{μs}\left({\color{gray}2.66 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$2.45 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{red}5.71 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$34.0 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}-1.523 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$76.7 \mathrm{ms} \pm 705 \mathrm{μs}\left({\color{red}7.65 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$41.1 \mathrm{ms} \pm 405 \mathrm{μs}\left({\color{red}11.0 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$43.0 \mathrm{ms} \pm 324 \mathrm{μs}\left({\color{gray}2.37 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$50.3 \mathrm{ms} \pm 456 \mathrm{μs}\left({\color{gray}3.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$35.6 \mathrm{ms} \pm 117 \mathrm{μs}\left({\color{gray}-1.023 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$429 \mathrm{ms} \pm 970 \mathrm{μs}\left({\color{gray}3.81 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$85.1 \mathrm{ms} \pm 416 \mathrm{μs}\left({\color{gray}-2.288 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$86.9 \mathrm{ms} \pm 508 \mathrm{μs}\left({\color{gray}-0.425 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$253 \mathrm{ms} \pm 646 \mathrm{μs}\left({\color{gray}-0.869 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$12.9 \mathrm{ms} \pm 63.4 \mathrm{μs}\left({\color{gray}-0.077 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$13.2 \mathrm{ms} \pm 91.6 \mathrm{μs}\left({\color{gray}0.684 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$14.1 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}1.61 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$13.3 \mathrm{ms} \pm 138 \mathrm{μs}\left({\color{gray}4.36 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$15.7 \mathrm{ms} \pm 93.3 \mathrm{μs}\left({\color{lightgreen}-6.200 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$13.0 \mathrm{ms} \pm 119 \mathrm{μs}\left({\color{gray}-3.005 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$13.0 \mathrm{ms} \pm 78.6 \mathrm{μs}\left({\color{lightgreen}-5.517 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$13.0 \mathrm{ms} \pm 103 \mathrm{μs}\left({\color{gray}-4.716 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$14.1 \mathrm{ms} \pm 98.0 \mathrm{μs}\left({\color{lightgreen}-8.867 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$20.6 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{lightgreen}-5.004 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$28.8 \mathrm{ms} \pm 311 \mathrm{μs}\left({\color{gray}3.62 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$28.4 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}2.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$27.8 \mathrm{ms} \pm 251 \mathrm{μs}\left({\color{gray}-3.946 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$27.1 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{gray}-4.474 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$26.8 \mathrm{ms} \pm 306 \mathrm{μs}\left({\color{lightgreen}-6.887 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$27.2 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}-3.842 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$28.3 \mathrm{ms} \pm 294 \mathrm{μs}\left({\color{gray}-0.842 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$27.4 \mathrm{ms} \pm 328 \mathrm{μs}\left({\color{lightgreen}-5.202 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$28.2 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}-1.098 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$6.80 \mathrm{ms} \pm 61.4 \mathrm{μs}\left({\color{gray}-1.772 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$43.3 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}-1.802 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$85.0 \mathrm{ms} \pm 376 \mathrm{μs}\left({\color{gray}-0.356 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$49.7 \mathrm{ms} \pm 244 \mathrm{μs}\left({\color{gray}-0.040 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$57.7 \mathrm{ms} \pm 486 \mathrm{μs}\left({\color{gray}1.56 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$63.9 \mathrm{ms} \pm 333 \mathrm{μs}\left({\color{gray}-1.479 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$68.3 \mathrm{ms} \pm 364 \mathrm{μs}\left({\color{gray}-2.342 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$47.5 \mathrm{ms} \pm 254 \mathrm{μs}\left({\color{gray}-0.615 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$70.0 \mathrm{ms} \pm 337 \mathrm{μs}\left({\color{gray}-3.431 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$53.5 \mathrm{ms} \pm 394 \mathrm{μs}\left({\color{gray}-0.940 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$58.1 \mathrm{ms} \pm 325 \mathrm{μs}\left({\color{lightgreen}-5.125 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$60.6 \mathrm{ms} \pm 319 \mathrm{μs}\left({\color{gray}-2.972 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$61.9 \mathrm{ms} \pm 350 \mathrm{μs}\left({\color{gray}0.398 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$130 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{gray}4.95 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$126 \mathrm{ms} \pm 432 \mathrm{μs}\left({\color{gray}3.89 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$38.7 \mathrm{ms} \pm 143 \mathrm{μs}\left({\color{red}9.82 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$544 \mathrm{ms} \pm 1.06 \mathrm{ms}\left({\color{red}6.78 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

2 participants