Skip to content

BE-494: HashQL: Loop-breaker selection for recursive inlining#8600

Draft
indietyp wants to merge 6 commits intobm/be-482-hashql-remove-logical-not-from-unary-operatorsfrom
bm/be-494-hashql-scc-loop-breaker-inlining
Draft

BE-494: HashQL: Loop-breaker selection for recursive inlining#8600
indietyp wants to merge 6 commits intobm/be-482-hashql-remove-logical-not-from-unary-operatorsfrom
bm/be-494-hashql-scc-loop-breaker-inlining

Conversation

@indietyp
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

This PR implements a three-color depth-first search algorithm for directed graphs and integrates it with a loop-breaker selection system for the MIR inliner. The three-color DFS enables cycle detection and postorder traversal, while the loop-breaker system allows the inliner to handle mutually recursive functions by strategically selecting which functions to avoid inlining within strongly connected components (SCCs).

🔗 Related links

  • Related to MIR optimization and inlining strategies for recursive function groups

🔍 What does this change?

  • Adds a new three-color depth-first search implementation in libs/@local/hashql/core/src/graph/algorithms/color/mod.rs with support for cycle detection and visitor callbacks
  • Implements a loop-breaker selection algorithm in libs/@local/hashql/mir/src/pass/transform/inline/loop_breaker.rs that uses scoring heuristics to choose which functions in recursive SCCs should not be inlined
  • Extends the inline pass to process SCCs with loop-breaker awareness, allowing inlining of non-breaker functions while avoiding infinite recursion
  • Adds comprehensive test coverage for both the three-color DFS algorithm and loop-breaker selection
  • Updates the call graph analysis to support querying callers of a function
  • Adds iterator support for SCC members with both immutable and mutable access
  • Changes unary NOT operator representation from ! to ~ in MIR output formatting
  • Extends inline configuration with InlineLoopBreakerConfig for tuning breaker selection heuristics

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?

  • Comprehensive unit tests for three-color DFS including cycle detection, postorder traversal, edge filtering, and state accumulation
  • Loop-breaker selection tests covering mutual recursion, cost-based selection, multi-cycle SCCs, and ordering verification
  • Integration tests showing the complete inlining behavior with loop breakers
  • Existing MIR transformation tests updated to reflect the new unary operator formatting

❓ How to test this?

  1. Run the test suite to verify all three-color DFS and loop-breaker functionality
  2. Test with mutually recursive MIR functions to confirm proper breaker selection and inlining behavior
  3. Verify that the inliner no longer gets stuck in infinite loops when processing recursive function groups

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Mar 31, 2026 8:51pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Mar 31, 2026 8:51pm
hashdotdesign-tokens Ignored Ignored Preview Mar 31, 2026 8:51pm
petrinaut Skipped Skipped Mar 31, 2026 8:51pm

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 85.96491% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.64%. Comparing base (d6dbdd5) to head (5012bc6).

Files with missing lines Patch % Lines
...cal/hashql/core/src/graph/algorithms/tarjan/mod.rs 0.00% 22 Missing ⚠️
...ocal/hashql/core/src/graph/algorithms/color/mod.rs 93.24% 5 Missing ⚠️
...al/hashql/core/src/graph/algorithms/color/tests.rs 96.21% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                     Coverage Diff                                      @@
##           bm/be-482-hashql-remove-logical-not-from-unary-operators    #8600      +/-   ##
============================================================================================
+ Coverage                                                     56.59%   64.64%   +8.04%     
============================================================================================
  Files                                                          1029      891     -138     
  Lines                                                        103401    76997   -26404     
  Branches                                                       4358     4035     -323     
============================================================================================
- Hits                                                          58522    49774    -8748     
+ Misses                                                        44239    26676   -17563     
+ Partials                                                        640      547      -93     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system ?
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-authorization ?
rust.hash-graph-postgres-store ?
rust.hash-graph-store ?
rust.hash-graph-types ?
rust.hashql-compiletest 28.31% <ø> (ø)

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.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 31, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing bm/be-494-hashql-scc-loop-breaker-inlining (5012bc6) with bm/be-482-hashql-remove-logical-not-from-unary-operators (d6dbdd5)

Open in CodSpeed

///
/// Structure: A <-> B, C <-> D, with B -> C and D -> A connecting them.
#[test]
fn loop_breaker_multi_breaker_scc() {

Check warning

Code scanning / clippy

this function has too many lines (106/100) Warning test

this function has too many lines (106/100)
let mut search = TriColorDepthFirstSearch::new_in(&graph, &heap);
let mut cycle_found = false;

use core::ops::ControlFlow;

Check warning

Code scanning / clippy

adding items after statements is confusing, since items exist from the start of the scope Warning test

adding items after statements is confusing, since items exist from the start of the scope

use core::ops::ControlFlow;

use hashql_core::graph::algorithms::color::NodeColor;

Check warning

Code scanning / clippy

adding items after statements is confusing, since items exist from the start of the scope Warning test

adding items after statements is confusing, since items exist from the start of the scope
Comment on lines +1480 to +1483
struct RemainderCycleDetector<'a> {
members: &'a [DefId],
breakers: &'a DenseBitSet<DefId>,
}

Check warning

Code scanning / clippy

adding items after statements is confusing, since items exist from the start of the scope Warning test

adding items after statements is confusing, since items exist from the start of the scope
Comment on lines +1485 to +1503
impl<G: hashql_core::graph::DirectedGraph<NodeId = DefId>>
hashql_core::graph::algorithms::TriColorVisitor<G> for RemainderCycleDetector<'_>
{
type Result = ControlFlow<()>;

fn node_examined(&mut self, _: DefId, before: Option<NodeColor>) -> Self::Result {
match before {
Some(NodeColor::Gray) => ControlFlow::Break(()),
_ => ControlFlow::Continue(()),
}
}

fn ignore_edge(&mut self, source: DefId, target: DefId) -> bool {
self.breakers.contains(source)
|| self.breakers.contains(target)
|| !self.members.contains(&source)
|| !self.members.contains(&target)
}
}

Check warning

Code scanning / clippy

adding items after statements is confusing, since items exist from the start of the scope Warning test

adding items after statements is confusing, since items exist from the start of the scope
}
}

let all_members: Vec<DefId> = (0..bodies.len()).map(|i| DefId::new(i as u32)).collect();

Check warning

Code scanning / clippy

casting usize to u32 may truncate the value on targets with 64-bit wide pointers Warning test

casting usize to u32 may truncate the value on targets with 64-bit wide pointers
Comment on lines +1513 to +1518
if !breakers.contains(member) {
if search.run_from(member, &mut detector).is_break() {
cycle_found = true;
break;
}
}

Check warning

Code scanning / clippy

this if statement can be collapsed Warning test

this if statement can be collapsed
assert_eq!(order.len(), 4);

// Non-breakers in postorder: W before Y before X.
let pos = |id: DefId| order.iter().position(|&n| n == id).unwrap();

Check warning

Code scanning / clippy

used unwrap() on an Option value Warning test

used unwrap() on an Option value
@indietyp indietyp force-pushed the bm/be-482-hashql-remove-logical-not-from-unary-operators branch from 51195eb to d6dbdd5 Compare March 31, 2026 20:56
@indietyp indietyp force-pushed the bm/be-494-hashql-scc-loop-breaker-inlining branch from f66d5ce to b4e6aaf Compare March 31, 2026 20:56
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

Deployment failed with the following error:

Invalid request: `attribution.gitUser` should NOT have additional property `isBot`.

@github-actions
Copy link
Copy Markdown
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 $$25.7 \mathrm{ms} \pm 191 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.39 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{gray}-1.778 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.1 \mathrm{ms} \pm 81.7 \mathrm{μs}\left({\color{gray}0.225 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.3 \mathrm{ms} \pm 289 \mathrm{μs}\left({\color{gray}0.114 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.3 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{gray}0.578 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.4 \mathrm{ms} \pm 163 \mathrm{μs}\left({\color{gray}-0.262 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.1 \mathrm{ms} \pm 165 \mathrm{μs}\left({\color{gray}-0.291 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.67 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}-2.063 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.1 \mathrm{ms} \pm 88.6 \mathrm{μs}\left({\color{gray}-0.481 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.70 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}-0.877 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.97 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-0.996 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.30 \mathrm{ms} \pm 15.6 \mathrm{μs}\left({\color{gray}-1.399 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.10 \mathrm{ms} \pm 30.7 \mathrm{μs}\left({\color{gray}-0.357 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.55 \mathrm{ms} \pm 15.5 \mathrm{μs}\left({\color{gray}-1.258 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.08 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}-1.072 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.40 \mathrm{ms} \pm 31.7 \mathrm{μs}\left({\color{gray}0.206 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.40 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}-1.493 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.99 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}-0.687 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.73 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{gray}-1.522 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}-1.216 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.80 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{gray}-1.570 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.02 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{gray}-1.518 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.85 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}-1.195 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.11 \mathrm{ms} \pm 13.4 \mathrm{μs}\left({\color{gray}-3.100 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.06 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}0.026 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.75 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{gray}-2.195 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.94 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-0.882 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.48 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}-0.505 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.09 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{gray}0.049 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.27 \mathrm{ms} \pm 14.9 \mathrm{μs}\left({\color{gray}-0.753 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.40 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{gray}-0.043 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}-0.982 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.33 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}-1.203 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$44.6 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}-0.319 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$80.6 \mathrm{ms} \pm 322 \mathrm{μs}\left({\color{gray}-4.243 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$48.9 \mathrm{ms} \pm 232 \mathrm{μs}\left({\color{gray}-4.743 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$50.3 \mathrm{ms} \pm 260 \mathrm{μs}\left({\color{gray}-1.056 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$60.2 \mathrm{ms} \pm 274 \mathrm{μs}\left({\color{gray}-3.548 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$45.5 \mathrm{ms} \pm 208 \mathrm{μs}\left({\color{gray}-1.551 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$399 \mathrm{ms} \pm 902 \mathrm{μs}\left({\color{gray}-4.129 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$99.5 \mathrm{ms} \pm 419 \mathrm{μs}\left({\color{gray}-1.397 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$82.6 \mathrm{ms} \pm 330 \mathrm{μs}\left({\color{gray}-0.973 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$284 \mathrm{ms} \pm 707 \mathrm{μs}\left({\color{lightgreen}-10.615 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.4 \mathrm{ms} \pm 85.2 \mathrm{μs}\left({\color{gray}-3.204 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$20.0 \mathrm{ms} \pm 109 \mathrm{μs}\left({\color{gray}-3.537 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$19.9 \mathrm{ms} \pm 118 \mathrm{μs}\left({\color{gray}-3.018 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$20.0 \mathrm{ms} \pm 99.7 \mathrm{μs}\left({\color{gray}-1.416 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.3 \mathrm{ms} \pm 156 \mathrm{μs}\left({\color{gray}-1.633 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.2 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{gray}-1.289 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.3 \mathrm{ms} \pm 105 \mathrm{μs}\left({\color{gray}-0.936 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.2 \mathrm{ms} \pm 81.1 \mathrm{μs}\left({\color{gray}-0.231 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$19.7 \mathrm{ms} \pm 163 \mathrm{μs}\left({\color{gray}0.337 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$25.8 \mathrm{ms} \pm 207 \mathrm{μs}\left({\color{gray}1.73 \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 $$32.4 \mathrm{ms} \pm 267 \mathrm{μs}\left({\color{gray}-3.096 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$34.8 \mathrm{ms} \pm 255 \mathrm{μs}\left({\color{gray}3.63 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$35.4 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{red}9.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.4 \mathrm{ms} \pm 198 \mathrm{μs}\left({\color{gray}2.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$35.1 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}3.67 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$33.9 \mathrm{ms} \pm 286 \mathrm{μs}\left({\color{gray}-0.029 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$34.3 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}2.38 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$33.7 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}0.788 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$33.6 \mathrm{ms} \pm 250 \mathrm{μs}\left({\color{gray}1.01 \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 $$8.30 \mathrm{ms} \pm 42.0 \mathrm{μs}\left({\color{gray}0.111 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$89.2 \mathrm{ms} \pm 363 \mathrm{μs}\left({\color{gray}-1.470 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$140 \mathrm{ms} \pm 534 \mathrm{μs}\left({\color{gray}-0.452 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$96.7 \mathrm{ms} \pm 478 \mathrm{μs}\left({\color{gray}0.100 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$104 \mathrm{ms} \pm 364 \mathrm{μs}\left({\color{gray}-0.283 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$113 \mathrm{ms} \pm 561 \mathrm{μs}\left({\color{gray}-0.568 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$119 \mathrm{ms} \pm 502 \mathrm{μs}\left({\color{gray}-1.262 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$98.6 \mathrm{ms} \pm 376 \mathrm{μs}\left({\color{gray}-0.921 \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 $$127 \mathrm{ms} \pm 462 \mathrm{μs}\left({\color{gray}-0.287 \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 $$106 \mathrm{ms} \pm 443 \mathrm{μs}\left({\color{gray}-0.118 \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 $$114 \mathrm{ms} \pm 399 \mathrm{μs}\left({\color{gray}-0.405 \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 $$117 \mathrm{ms} \pm 393 \mathrm{μs}\left({\color{gray}-0.906 \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 $$117 \mathrm{ms} \pm 475 \mathrm{μs}\left({\color{gray}-0.155 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$140 \mathrm{ms} \pm 424 \mathrm{μs}\left({\color{gray}3.99 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$150 \mathrm{ms} \pm 511 \mathrm{μs}\left({\color{gray}2.69 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$107 \mathrm{ms} \pm 419 \mathrm{μs}\left({\color{gray}-0.245 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$591 \mathrm{ms} \pm 3.32 \mathrm{ms}\left({\color{gray}1.82 \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