Skip to content

Conversation

@indietyp
Copy link
Member

🌟 What is the purpose of this PR?

Add benchmarks for BitMatrix and SparseBitMatrix implementations, and moves the implementation into a dedicated module.

Performance

Benchmarked against the previous implementation across sizes 64, 200, and 1000:

Operation Improvement
Dense insert At parity (±1%)
Dense contains 5–19% faster
Dense union_rows 1.8–2.0x faster
Dense iter_row At parity
Sparse insert 6–42% faster
Sparse union_rows 1.5–3.8x faster
Sparse clear+reinsert 2.0–2.3x faster (sizes ≥ 200)

🔍 What does this change?

  • Adds a new benchmark suite for bit matrix operations
  • Completely rewrites the BitMatrix and SparseBitMatrix implementations:
    • Adds zero-copy row access through RowRef and RowMut view types
    • Improves cache locality and vectorization in BitMatrix
    • Implements a free-list for SparseBitMatrix to recycle cleared rows
    • Adds comprehensive API for bitwise operations (union, subtract, intersect)
    • Optimizes transitive closure algorithm
    • Adds support for custom allocators
  • Moves matrix implementations to a dedicated module
  • Updates dominance frontier code to use the new row view types

🛡 What tests cover this?

  • Comprehensive unit tests for both BitMatrix and SparseBitMatrix
  • Property-based tests that verify equivalence between the two implementations
  • New benchmarks that measure performance across various matrix sizes

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

@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Feb 12, 2026 9:18am
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Feb 12, 2026 9:18am
hashdotdesign-tokens Ignored Ignored Preview Feb 12, 2026 9:18am
petrinaut Skipped Skipped Feb 12, 2026 9:18am

@cursor
Copy link

cursor bot commented Feb 11, 2026

PR Summary

Medium Risk
Replaces core bitset matrix data structures used in compiler/graph algorithms; although heavily tested, subtle correctness/perf regressions or memory/allocator edge cases could impact analyses like dominance frontiers and DSE.

Overview
Refactors and replaces the BitMatrix/SparseBitMatrix implementation by moving it into a new id/bit_vec/matrix module, adding zero-copy row view types (RowRef, RowMut) and expanding the API for row-level bitwise ops plus closure helpers.

Changes the sparse representation from per-row DenseBitSet storage to a single arena-backed buffer with an index + free-list, and updates call sites to the new iteration/row APIs (e.g. dominance frontier now stores RowRef, DSE uses iter_row). Adds extensive new unit/property tests for dense+sparse behavior and a new codspeed benchmark (bit_matrix) registered in Cargo.toml.

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

@github-actions github-actions bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels Feb 11, 2026
Copy link
Member Author

indietyp commented Feb 11, 2026

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.

@augmentcode
Copy link

augmentcode bot commented Feb 11, 2026

🤖 Augment PR Summary

Summary: This PR reworks the core bit-matrix data structures by moving them into a dedicated module, adding row view types, and introducing a new benchmark suite to measure performance across common sizes.

Changes:

  • Added a new Criterion/Codspeed benchmark target for dense and sparse bit-matrix operations (benches/bit_matrix.rs).
  • Introduced id::bit_vec::matrix module containing rewritten BitMatrix and SparseBitMatrix implementations with allocator support.
  • Added zero-copy row access via RowRef/RowMut, enabling row-level operations without allocating/copying.
  • Reimplemented SparseBitMatrix as an arena-backed structure with a free-list for recycling cleared rows.
  • Expanded the API for row-wise bitwise operations (union/subtract/intersect) and (dense) transitive-closure helpers.
  • Updated dominator frontier code to use the new row view type (RowRef), and updated DSE to use iter_row.
  • Added comprehensive unit tests plus property-based equivalence tests for dense vs sparse behavior.

Technical Notes: The new dense representation is contiguous (better cache locality/vectorization), while the sparse version reduces per-row allocation overhead by storing all row words in a shared backing buffer.

🤖 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. 4 suggestions posted.

Fix All in Augment

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

/// achieving a 64× speedup over the scalar version through bitwise parallelism.
pub fn transitive_closure(&mut self) {
let size = self.row_domain_size;
debug_assert_eq!(size, self.col_domain_size);
Copy link

Choose a reason for hiding this comment

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

transitive_closure only uses debug_assert_eq!(size, self.col_domain_size), so a non-square matrix can yield incorrect behavior in release builds (or panic later via bounds asserts). Consider enforcing the square-matrix precondition non-conditionally (same concern applies to reflexive_transitive_closure).

Severity: medium

Other Locations
  • libs/@local/hashql/core/src/id/bit_vec/matrix/mod.rs:707

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.


/// Returns `true` if every bit set in `other` is also set in `row`.
#[inline]
pub fn superset_row(&self, row: R, other: &DenseBitSet<C>) -> Option<bool> {
Copy link

Choose a reason for hiding this comment

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

superset_row/subset_row don’t enforce that other.domain_size() matches self.col_domain_size (and RowRef::superset_dense only debug_asserts), so mismatched domains can silently produce wrong results in release due to zip truncation. Consider validating domain-size equality in these public methods.

Severity: low

Other Locations
  • libs/@local/hashql/core/src/id/bit_vec/matrix/mod.rs:1145

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 90.63604% with 106 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.94%. Comparing base (e20307f) to head (212c24c).

Files with missing lines Patch % Lines
...bs/@local/hashql/core/src/id/bit_vec/matrix/mod.rs 80.98% 102 Missing and 2 partials ⚠️
...l/core/src/graph/algorithms/dominators/frontier.rs 33.33% 2 Missing ⚠️
Additional details and impacted files
@@                                           Coverage Diff                                            @@
##           bm/be-372-hashql-do-not-consider-traversals-during-liveness-analysis    #8408      +/-   ##
========================================================================================================
+ Coverage                                                                 67.66%   67.94%   +0.28%     
========================================================================================================
  Files                                                                       831      833       +2     
  Lines                                                                     75367    76136     +769     
  Branches                                                                   3940     3951      +11     
========================================================================================================
+ Hits                                                                      50995    51731     +736     
- Misses                                                                    23811    23848      +37     
+ Partials                                                                    561      557       -4     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.41% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.hash-graph-sdk 6.66% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 2.88% <ø> (ø)
rust.hashql-ast 87.25% <ø> (ø)
rust.hashql-compiletest 29.69% <ø> (ø)
rust.hashql-core 82.17% <90.62%> (+0.47%) ⬆️
rust.hashql-eval 69.13% <ø> (ø)
rust.hashql-hir 89.11% <ø> (ø)
rust.hashql-mir 90.88% <100.00%> (ø)
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.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 11, 2026

Merging this PR will improve performance by 35.34%

⚡ 6 improved benchmarks
✅ 35 untouched benchmarks
🆕 24 new benchmarks
🗄️ 12 archived benchmarks run1

Performance Changes

Benchmark BASE HEAD Efficiency
complex 18 µs 16.2 µs +11.32%
dead stores 11.5 µs 9.4 µs +22.63%
diamond 7.3 µs 5.4 µs +35.34%
complex 8 µs 7 µs +13.79%
linear 6.7 µs 5.1 µs +32.27%
diamond 12.2 µs 10.8 µs +13.29%
🆕 bit_matrix/dense/contains[1000] N/A 4.5 ms N/A
🆕 bit_matrix/dense/contains[200] N/A 181.4 µs N/A
🆕 bit_matrix/dense/iter_row[1000] N/A 495.3 ns N/A
🆕 bit_matrix/dense/insert[1000] N/A 659.8 µs N/A
🆕 bit_matrix/dense/contains[64] N/A 18.8 µs N/A
🆕 bit_matrix/dense/insert[200] N/A 29.4 µs N/A
🆕 bit_matrix/dense/iter_row[200] N/A 213.9 ns N/A
🆕 bit_matrix/dense/union_rows[1000] N/A 102.4 µs N/A
🆕 bit_matrix/dense/insert[64] N/A 4.2 µs N/A
🆕 bit_matrix/dense/transitive_closure[64] N/A 67.8 µs N/A
🆕 bit_matrix/dense/iter_row[64] N/A 139.7 ns N/A
🆕 bit_matrix/dense/transitive_closure[200] N/A 862 µs N/A
🆕 bit_matrix/dense/union_rows[64] N/A 2.3 µs N/A
🆕 bit_matrix/dense/union_rows[200] N/A 9 µs N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing bm/be-394-hashql-rework-bitmatrix (212c24c) with bm/be-372-hashql-do-not-consider-traversals-during-liveness-analysis (e20307f)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@indietyp indietyp force-pushed the bm/be-372-hashql-do-not-consider-traversals-during-liveness-analysis branch from 5351b95 to e20307f Compare February 11, 2026 22:03
@indietyp indietyp force-pushed the bm/be-394-hashql-rework-bitmatrix branch from fa38f9f to b1e1a0c Compare February 11, 2026 22:03
@vercel vercel bot temporarily deployed to Preview – petrinaut February 11, 2026 22:03 Inactive
@indietyp indietyp changed the title BE-394: Rework BitMatrix and SparseBitMatrix BE-394: HashQL: Rework BitMatrix and SparseBitMatrix Feb 12, 2026
@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 $$26.9 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{gray}-0.371 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.25 \mathrm{ms} \pm 15.6 \mathrm{μs}\left({\color{gray}0.040 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.1 \mathrm{ms} \pm 95.3 \mathrm{μs}\left({\color{gray}-2.036 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.5 \mathrm{ms} \pm 333 \mathrm{μs}\left({\color{gray}0.790 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$13.9 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{gray}0.064 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.2 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{gray}-1.748 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.7 \mathrm{ms} \pm 181 \mathrm{μs}\left({\color{gray}0.943 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}0.968 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.4 \mathrm{ms} \pm 112 \mathrm{μs}\left({\color{gray}4.08 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.60 \mathrm{ms} \pm 19.5 \mathrm{μs}\left({\color{gray}-0.187 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.82 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{gray}0.591 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.17 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}0.533 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.94 \mathrm{ms} \pm 30.3 \mathrm{μs}\left({\color{gray}-0.419 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.38 \mathrm{ms} \pm 17.9 \mathrm{μs}\left({\color{gray}-1.614 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.94 \mathrm{ms} \pm 28.7 \mathrm{μs}\left({\color{gray}-0.356 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.23 \mathrm{ms} \pm 25.5 \mathrm{μs}\left({\color{gray}0.734 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.28 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}1.42 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.86 \mathrm{ms} \pm 24.2 \mathrm{μs}\left({\color{gray}0.633 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.57 \mathrm{ms} \pm 9.35 \mathrm{μs}\left({\color{gray}-2.341 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.54 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{gray}-0.907 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.65 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{gray}-2.020 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.88 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-1.368 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.69 \mathrm{ms} \pm 13.3 \mathrm{μs}\left({\color{gray}-2.101 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.98 \mathrm{ms} \pm 17.6 \mathrm{μs}\left({\color{gray}-0.426 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.96 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{gray}0.986 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.62 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{gray}-0.355 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.79 \mathrm{ms} \pm 11.5 \mathrm{μs}\left({\color{gray}-0.003 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.31 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}-0.297 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.89 \mathrm{ms} \pm 14.9 \mathrm{μs}\left({\color{gray}0.622 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.13 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}-0.636 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.23 \mathrm{ms} \pm 15.8 \mathrm{μs}\left({\color{gray}-1.784 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.85 \mathrm{ms} \pm 10.0 \mathrm{μs}\left({\color{gray}-0.136 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.18 \mathrm{ms} \pm 20.3 \mathrm{μs}\left({\color{gray}2.50 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$39.2 \mathrm{ms} \pm 192 \mathrm{μs}\left({\color{gray}-0.898 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$76.1 \mathrm{ms} \pm 424 \mathrm{μs}\left({\color{gray}-1.277 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$43.0 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}-0.068 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$45.5 \mathrm{ms} \pm 167 \mathrm{μs}\left({\color{gray}-1.095 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$53.5 \mathrm{ms} \pm 354 \mathrm{μs}\left({\color{gray}-0.424 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$40.3 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}0.095 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$417 \mathrm{ms} \pm 1.29 \mathrm{ms}\left({\color{gray}0.156 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$93.1 \mathrm{ms} \pm 527 \mathrm{μs}\left({\color{red}5.43 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.1 \mathrm{ms} \pm 371 \mathrm{μs}\left({\color{gray}-1.213 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$282 \mathrm{ms} \pm 1.09 \mathrm{ms}\left({\color{gray}1.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.9 \mathrm{ms} \pm 83.8 \mathrm{μs}\left({\color{gray}3.20 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$15.0 \mathrm{ms} \pm 80.8 \mathrm{μs}\left({\color{gray}0.533 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.4 \mathrm{ms} \pm 85.4 \mathrm{μs}\left({\color{gray}1.93 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$14.6 \mathrm{ms} \pm 71.2 \mathrm{μs}\left({\color{gray}0.318 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$17.9 \mathrm{ms} \pm 99.0 \mathrm{μs}\left({\color{gray}0.864 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$15.0 \mathrm{ms} \pm 90.9 \mathrm{μs}\left({\color{gray}3.31 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$15.0 \mathrm{ms} \pm 83.8 \mathrm{μs}\left({\color{gray}2.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.9 \mathrm{ms} \pm 80.5 \mathrm{μs}\left({\color{gray}1.94 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.4 \mathrm{ms} \pm 75.3 \mathrm{μs}\left({\color{gray}0.812 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$23.1 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}3.93 \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 $$31.1 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{gray}-0.814 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$31.7 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}-1.379 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.4 \mathrm{ms} \pm 292 \mathrm{μs}\left({\color{gray}-2.438 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$30.2 \mathrm{ms} \pm 333 \mathrm{μs}\left({\color{lightgreen}-6.626 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.5 \mathrm{ms} \pm 265 \mathrm{μs}\left({\color{gray}-1.620 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.6 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{gray}-2.012 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$30.8 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}-0.867 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$29.7 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{gray}-4.914 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$30.8 \mathrm{ms} \pm 301 \mathrm{μs}\left({\color{gray}-3.013 \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.27 \mathrm{ms} \pm 39.5 \mathrm{μs}\left({\color{gray}-4.087 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$91.7 \mathrm{ms} \pm 535 \mathrm{μs}\left({\color{gray}-4.905 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$139 \mathrm{ms} \pm 520 \mathrm{μs}\left({\color{gray}0.036 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$98.4 \mathrm{ms} \pm 548 \mathrm{μs}\left({\color{gray}-2.871 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$106 \mathrm{ms} \pm 494 \mathrm{μs}\left({\color{gray}-2.610 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$114 \mathrm{ms} \pm 471 \mathrm{μs}\left({\color{gray}-0.666 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$122 \mathrm{ms} \pm 561 \mathrm{μs}\left({\color{gray}0.189 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$88.0 \mathrm{ms} \pm 506 \mathrm{μs}\left({\color{gray}2.63 \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 $$115 \mathrm{ms} \pm 488 \mathrm{μs}\left({\color{gray}1.63 \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 $$94.6 \mathrm{ms} \pm 505 \mathrm{μs}\left({\color{gray}1.83 \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 $$102 \mathrm{ms} \pm 432 \mathrm{μs}\left({\color{gray}1.81 \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 $$105 \mathrm{ms} \pm 507 \mathrm{μs}\left({\color{gray}2.17 \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 $$104 \mathrm{ms} \pm 575 \mathrm{μs}\left({\color{gray}1.06 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$137 \mathrm{ms} \pm 415 \mathrm{μs}\left({\color{gray}3.00 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$139 \mathrm{ms} \pm 483 \mathrm{μs}\left({\color{gray}3.22 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$103 \mathrm{ms} \pm 556 \mathrm{μs}\left({\color{gray}-0.655 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$573 \mathrm{ms} \pm 3.18 \mathrm{ms}\left({\color{gray}0.272 \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) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant