Skip to content

Add exportSegment refine HC#929

Merged
tomusdrw merged 9 commits intomainfrom
maso-refine-ext-export
Mar 18, 2026
Merged

Add exportSegment refine HC#929
tomusdrw merged 9 commits intomainfrom
maso-refine-ext-export

Conversation

@DrEverr
Copy link
Copy Markdown
Member

@DrEverr DrEverr commented Mar 16, 2026

Export Segment

  • update refine implementation
  • create tests for export segment
  • utilize exported segments in refine pipeline
  • updated some GP link refs
  • changed segment related GP constans

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 16, 2026

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Added segment export tracking capability during work item refinement with configurable offset support.
    • New method to retrieve exported segments for work items.
  • Bug Fixes

    • Updated maximum import and export constraints with increased limits (3072).
  • Documentation

    • Updated specification references to align with latest documentation versions.

Walkthrough

This PR renames and adds segment-related constants (W_S → W_P; MAX_NUMBER_OF_SEGMENTS → MAX_NUMBER_OF_IMPORTS_WP; adds MAX_NUMBER_OF_EXPORTS_WP = 3072) and updates SEGMENT_BYTES to use W_P. It threads an exportOffset through the refine flow, makes RefineExternalitiesImpl record exported segments and return segment indices from exportSegment while enforcing the new export limit, exposes getExportedSegments(), and updates callers in InCore and tests. Several Gray Paper doc URLs were updated to v0.7.2.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • skoszuta
  • mateuszsikora
  • tomusdrw

Poem

🐇 I hopped through segments, one by one,

exportOffset counted till the run was done.
W_P whispers where W_S used to be,
Exports stacked tidy—zero, one, two, three—
A little rabbit cheers this tidy spree.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Add exportSegment refine HC' is vague and uses abbreviated technical jargon ('HC') without context, making it unclear what the main change accomplishes. Use a more descriptive title like 'Add segment export tracking to refine host call' that clearly explains the feature being added.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description covers multiple aspects of the changeset including refine implementation updates, export segment tests, segment pipeline integration, and documentation updates that align with the actual changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch maso-refine-ext-export
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/jam/in-core/in-core.ts (1)

342-355: ⚠️ Potential issue | 🟠 Major

Do not propagate exports when export-count validation fails.

This branch returns exports even on incorrectNumberOfExports. Then refine() increments exportOffset from result.exports.length on Line 191, which can shift indices for later work items after an invalid item.

Suggested fix
     if (exports.length !== item.exportCount) {
       return {
-        exports,
+        exports: [],
         result: WorkResult.create({
           ...baseResult,
           result: WorkExecResult.error(WorkExecResultKind.incorrectNumberOfExports),
           load: WorkRefineLoad.create({
             ...baseLoad,
             gasUsed: tryAsServiceGas(item.refineGasLimit),
             exportedSegments: tryAsU32(0),
           }),
         }),
       };
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/jam/in-core/in-core.ts` around lines 342 - 355, The branch that
handles export-count mismatch currently returns the original exports array which
causes refine() to advance exportOffset by result.exports.length and corrupt
later indices; modify the incorrectNumberOfExports branch (the block checking
exports.length !== item.exportCount) to not propagate the original exports —
return an empty exports array (or clear exports) alongside the WorkResult that
sets exportedSegments to 0 and the error
WorkExecResultKind.incorrectNumberOfExports so that result.exports.length is
zero and exportOffset is not advanced; locate the check using exports and
item.exportCount and update the returned object to supply an empty exports list
instead of the existing exports.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/jam/block/work-item-segment.ts`:
- Around line 29-31: The comment above the exported segment formula references a
stale symbol W_S while the implementation uses W_P; update the doc comment for
the constants (W_G, W_E, W_P) in work-item-segment.ts so the formula reads `W_G
= W_E * W_P` (or otherwise matches the actual variable names used in the file)
and ensure any explanatory text or spec link remains consistent with the W_P
name.

In `@packages/jam/in-core/externalities/refine.ts`:
- Around line 10-21: The package is importing types like SegmentExportError and
RefineExternalities from `@typeberry/jam-host-calls` but that dependency is not
declared; update packages/jam/in-core/package.json to add
`@typeberry/jam-host-calls` (appropriate semver, e.g. same workspace version or
matching version used elsewhere) under "dependencies" (or "devDependencies" if
only used in tests/build) so import/no-extraneous-dependencies is satisfied and
the imports (SegmentExportError, RefineExternalities, MachineId, etc.) resolve
correctly.

---

Outside diff comments:
In `@packages/jam/in-core/in-core.ts`:
- Around line 342-355: The branch that handles export-count mismatch currently
returns the original exports array which causes refine() to advance exportOffset
by result.exports.length and corrupt later indices; modify the
incorrectNumberOfExports branch (the block checking exports.length !==
item.exportCount) to not propagate the original exports — return an empty
exports array (or clear exports) alongside the WorkResult that sets
exportedSegments to 0 and the error WorkExecResultKind.incorrectNumberOfExports
so that result.exports.length is zero and exportOffset is not advanced; locate
the check using exports and item.exportCount and update the returned object to
supply an empty exports list instead of the existing exports.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b6dff36d-b98c-4796-8dd0-64bd0e040995

📥 Commits

Reviewing files that changed from the base of the PR and between 5f4bdf7 and 3683ea6.

📒 Files selected for processing (7)
  • packages/jam/block/work-item-segment.ts
  • packages/jam/block/work-item.ts
  • packages/jam/in-core/externalities/refine.test.ts
  • packages/jam/in-core/externalities/refine.ts
  • packages/jam/in-core/in-core.ts
  • packages/jam/jam-host-calls/refine/export.ts
  • packages/jam/jam-host-calls/refine/historical-lookup.ts

Comment thread packages/jam/block/work-item-segment.ts
Comment thread packages/jam/in-core/externalities/refine.ts
@DrEverr DrEverr requested a review from tomusdrw March 16, 2026 09:56
Comment thread packages/jam/in-core/externalities/refine.test.ts Outdated
Comment thread packages/jam/in-core/externalities/refine.ts Outdated
Comment thread packages/jam/in-core/externalities/refine.ts Outdated
Comment thread packages/jam/in-core/in-core.ts Outdated
Co-authored-by: Tomek Drwięga <tomusdrw@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/jam/in-core/externalities/refine.ts (1)

61-67: Consider returning a defensive copy.

getExportedSegments() returns the internal array directly, allowing callers to mutate it. If this is intentional for performance, consider adding a comment noting that callers must not mutate the returned array. Otherwise, return a shallow copy with [...this.exportedSegments].

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/jam/in-core/externalities/refine.ts` around lines 61 - 67,
getExportedSegments currently returns the internal array exportedSegments
directly which allows external mutation; change getExportedSegments() to return
a shallow copy (e.g., return [...this.exportedSegments]) so callers cannot
mutate internal state, and update the method comment to reflect that a copy is
returned; reference the getExportedSegments method and the exportedSegments
property when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/jam/in-core/externalities/refine.test.ts`:
- Around line 191-203: The inline comment in the test incorrectly mentions
MAX_NUMBER_OF_SEGMENTS; update the comment to reference the correct constant
MAX_NUMBER_OF_EXPORTS_WP so it matches the assertion and setup. Locate the test
block that calls createExt({ exportOffset: MAX_NUMBER_OF_EXPORTS_WP - 1 }) and
exportSegment(createSegment(...)) and change the comment that currently reads
about MAX_NUMBER_OF_SEGMENTS to mention MAX_NUMBER_OF_EXPORTS_WP (or rephrase to
“index = MAX_NUMBER_OF_EXPORTS_WP - 1”) so the comment accurately reflects the
code.

---

Nitpick comments:
In `@packages/jam/in-core/externalities/refine.ts`:
- Around line 61-67: getExportedSegments currently returns the internal array
exportedSegments directly which allows external mutation; change
getExportedSegments() to return a shallow copy (e.g., return
[...this.exportedSegments]) so callers cannot mutate internal state, and update
the method comment to reflect that a copy is returned; reference the
getExportedSegments method and the exportedSegments property when making the
change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cda480d4-13bb-41c3-80cd-5909f340fa86

📥 Commits

Reviewing files that changed from the base of the PR and between 3683ea6 and e76c901.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • packages/jam/block/work-item-segment.ts
  • packages/jam/in-core/externalities/refine.test.ts
  • packages/jam/in-core/externalities/refine.ts
  • packages/jam/in-core/package.json

Comment thread packages/jam/in-core/externalities/refine.test.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/jam/in-core/externalities/refine.ts`:
- Around line 61-62: getExportedSegments currently returns the internal mutable
array exportedSegments by reference; change it to return a copy (e.g., create
and return a shallow copy of exportedSegments) so callers cannot mutate internal
state, and update the method signature to a readonly array (e.g., readonly
Segment[] in the interface) to tighten the contract and prevent mutation by
consumers; locate getExportedSegments and exportedSegments in the class and
apply these changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c2355b79-b05f-4399-b9a5-f4b341875692

📥 Commits

Reviewing files that changed from the base of the PR and between e76c901 and 8336be6.

📒 Files selected for processing (3)
  • packages/jam/in-core/externalities/refine.ts
  • packages/jam/in-core/in-core.ts
  • packages/jam/jam-host-calls/externalities/refine-externalities.ts

Comment thread packages/jam/in-core/externalities/refine.ts Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/jam/jam-host-calls/externalities/refine-externalities.test.ts (1)

155-161: ⚠️ Potential issue | 🟡 Minor

Track exported segments only on successful exports.

Line 160 appends to exportSegments even when exportSegment returns an error. This makes the test double diverge from real refine externalities behavior and can skew failure-path assertions.

Suggested fix
  exportSegment(segment: Segment): Result<SegmentIndex, SegmentExportError> {
    const result = this.exportSegmentData.get(segment);
    if (result === undefined) {
      throw new Error(`Unexpected call to exportSegment with: ${segment}`);
    }
-    this.exportSegments.push(segment);
+    if (result.isOk) {
+      this.exportSegments.push(segment);
+    }
    return result;
  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/jam/jam-host-calls/externalities/refine-externalities.test.ts`
around lines 155 - 161, The test helper's exportSegment currently pushes the
segment into exportSegments regardless of the Result in exportSegmentData;
change exportSegment (the method) to inspect the Result returned from
exportSegmentData.get(segment) and only push to exportSegments when the Result
indicates a successful export (i.e., the Ok/Success variant), leaving error
results untracked; use the existing exportSegmentData and exportSegments fields
to perform this conditional push so failure-path assertions match real refine
externalities behavior.
packages/jam/in-core/in-core.ts (1)

342-353: ⚠️ Potential issue | 🟠 Major

Keep load.exportedSegments consistent with returned exports on mismatch path.

When Line 342 fails, this branch still returns exports, but Line 351 reports exportedSegments: 0. That creates inconsistent report data for the same item.

Suggested fix
     if (exports.length !== item.exportCount) {
       return {
         exports,
         result: WorkResult.create({
           ...baseResult,
           result: WorkExecResult.error(WorkExecResultKind.incorrectNumberOfExports),
           load: WorkRefineLoad.create({
             ...baseLoad,
             gasUsed: tryAsServiceGas(item.refineGasLimit),
-            exportedSegments: tryAsU32(0),
+            exportedSegments: tryAsU32(exports.length),
           }),
         }),
       };
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/jam/in-core/in-core.ts` around lines 342 - 353, The mismatch branch
in in-core.ts returns the variable exports but sets load.exportedSegments to 0;
update the incorrect-number-of-exports branch so the returned
WorkRefineLoad.exportedSegments reflects the actual exports count (use
exports.length via tryAsU32(exports.length) instead of tryAsU32(0)), keeping the
rest of the error result and gas logic the same; locate this change in the block
that constructs WorkResult.create when exports.length !== item.exportCount.
🧹 Nitpick comments (1)
packages/jam/in-core/in-core.ts (1)

36-44: Consider aligning RefineResult.exports with readonly semantics.

RefineItemResult.exports is readonly, but RefineResult.exports is still mutable (PerWorkItem<Segment[]>). Keeping both readonly would make the API contract consistent end-to-end.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/jam/in-core/in-core.ts` around lines 36 - 44, RefineResult.exports
is currently mutable while RefineItemResult.exports is readonly; update the
RefineResult type so its exports use the same readonly semantics by changing the
exports generic from PerWorkItem<Segment[]> to PerWorkItem<readonly Segment[]>
(or an equivalent readonly Segment[] type) so both RefineResult.exports and
RefineItemResult.exports are consistent; adjust any consuming code or type
assertions that assume mutability of RefineResult.exports (look for usages of
RefineResult and PerWorkItem) and run type checks to ensure no breaks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/jam/in-core/in-core.ts`:
- Around line 342-353: The mismatch branch in in-core.ts returns the variable
exports but sets load.exportedSegments to 0; update the
incorrect-number-of-exports branch so the returned
WorkRefineLoad.exportedSegments reflects the actual exports count (use
exports.length via tryAsU32(exports.length) instead of tryAsU32(0)), keeping the
rest of the error result and gas logic the same; locate this change in the block
that constructs WorkResult.create when exports.length !== item.exportCount.

In `@packages/jam/jam-host-calls/externalities/refine-externalities.test.ts`:
- Around line 155-161: The test helper's exportSegment currently pushes the
segment into exportSegments regardless of the Result in exportSegmentData;
change exportSegment (the method) to inspect the Result returned from
exportSegmentData.get(segment) and only push to exportSegments when the Result
indicates a successful export (i.e., the Ok/Success variant), leaving error
results untracked; use the existing exportSegmentData and exportSegments fields
to perform this conditional push so failure-path assertions match real refine
externalities behavior.

---

Nitpick comments:
In `@packages/jam/in-core/in-core.ts`:
- Around line 36-44: RefineResult.exports is currently mutable while
RefineItemResult.exports is readonly; update the RefineResult type so its
exports use the same readonly semantics by changing the exports generic from
PerWorkItem<Segment[]> to PerWorkItem<readonly Segment[]> (or an equivalent
readonly Segment[] type) so both RefineResult.exports and
RefineItemResult.exports are consistent; adjust any consuming code or type
assertions that assume mutability of RefineResult.exports (look for usages of
RefineResult and PerWorkItem) and run type checks to ensure no breaks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e2ef29da-ceab-4864-bd4e-ab8e5407a33b

📥 Commits

Reviewing files that changed from the base of the PR and between 8336be6 and a00cf2d.

📒 Files selected for processing (6)
  • packages/jam/in-core/externalities/refine.test.ts
  • packages/jam/in-core/externalities/refine.ts
  • packages/jam/in-core/in-core.ts
  • packages/jam/jam-host-calls/externalities/refine-externalities.test.ts
  • packages/jam/jam-host-calls/externalities/refine-externalities.ts
  • packages/jam/jam-host-calls/refine/export.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/jam/jam-host-calls/externalities/refine-externalities.ts

@github-actions
Copy link
Copy Markdown

View all
File Benchmark Ops
bytes/hex-from.ts[0] parse hex using Number with NaN checking 68847.14 ±0.75% 84.96% slower
bytes/hex-from.ts[1] parse hex from char codes 457856.89 ±0.35% fastest ✅
bytes/hex-from.ts[2] parse hex from string nibbles 267517.25 ±0.2% 41.57% slower
bytes/hex-to.ts[0] number toString + padding 89199.35 ±1.34% fastest ✅
bytes/hex-to.ts[1] manual 7430.8 ±0.78% 91.67% slower
codec/bigint.compare.ts[0] compare custom 91899482.27 ±5.46% fastest ✅
codec/bigint.compare.ts[1] compare bigint 90227937.03 ±6.28% 1.82% slower
codec/bigint.decode.ts[0] decode custom 68395007.54 ±4.41% 29.36% slower
codec/bigint.decode.ts[1] decode bigint 96816107.35 ±4.61% fastest ✅
codec/decoding.ts[0] manual decode 9682250.37 ±1.1% 85.83% slower
codec/decoding.ts[1] int32array decode 67037728.84 ±2.8% 1.86% slower
codec/decoding.ts[2] dataview decode 68311299.44 ±4.17% fastest ✅
codec/encoding.ts[0] manual encode 1086534.75 ±0.48% 12.95% slower
codec/encoding.ts[1] int32array encode 1248154.56 ±0.31% fastest ✅
codec/encoding.ts[2] dataview encode 1224759.44 ±0.27% 1.87% slower
collections/map-set.ts[0] 2 gets + conditional set 70047.29 ±0.33% fastest ✅
collections/map-set.ts[1] 1 get 1 set 47211.76 ±0.09% 32.6% slower
logger/index.ts[0] console.log with string concat 4927900.25 ±42.13% fastest ✅
logger/index.ts[1] console.log with args 1548233.98 ±72.35% 68.58% slower
math/add_one_overflow.ts[0] add and take modulus 98007873.45 ±4.44% fastest ✅
math/add_one_overflow.ts[1] condition before calculation 94579448.15 ±6.41% 3.5% slower
math/count-bits-u32.ts[0] standard method 39750812.12 ±7.49% fastest ✅
math/count-bits-u32.ts[1] magic 1893134.01 ±33.98% 95.24% slower
math/count-bits-u64.ts[0] standard method 404218.32 ±0.54% 84.99% slower
math/count-bits-u64.ts[1] magic 2692364.24 ±0.37% fastest ✅
math/mul_overflow.ts[0] multiply and bring back to u32 103165190.96 ±4.25% fastest ✅
math/mul_overflow.ts[1] multiply and take modulus 99360554.47 ±4.95% 3.69% slower
math/switch.ts[0] switch 97703290.4 ±5.15% fastest ✅
math/switch.ts[1] if 97407066.06 ±4.21% 0.3% slower
hash/index.ts[0] hash with numeric representation 67.8 ±0.36% 31.83% slower
hash/index.ts[1] hash with string representation 43.13 ±0.35% 56.63% slower
hash/index.ts[2] hash with symbol representation 66.42 ±0.13% 33.21% slower
hash/index.ts[3] hash with uint8 representation 74.94 ±0.76% 24.65% slower
hash/index.ts[4] hash with packed representation 99.45 ±0.1% fastest ✅
hash/index.ts[5] hash with bigint representation 70.49 ±0.46% 29.12% slower
hash/index.ts[6] hash with uint32 representation 92.28 ±0.11% 7.21% slower
bytes/bytes-to-number.ts[0] Conversion with bitops 3713.37 ±5.97% fastest ✅
bytes/bytes-to-number.ts[1] Conversion without bitops 3035.12 ±4.48% 18.27% slower
bytes/compare.ts[0] Comparing Uint32 bytes 12262.63 ±0.84% fastest ✅
bytes/compare.ts[1] Comparing raw bytes 11517.02 ±0.3% 6.08% slower
codec/view_vs_collection.ts[0] Get first element from Decoded 14892.82 ±0.64% 54.3% slower
codec/view_vs_collection.ts[1] Get first element from View 32588.28 ±0.79% fastest ✅
codec/view_vs_collection.ts[2] Get 50th element from Decoded 14893.56 ±0.59% 54.3% slower
codec/view_vs_collection.ts[3] Get 50th element from View 17346.25 ±0.32% 46.77% slower
codec/view_vs_collection.ts[4] Get last element from Decoded 14651.7 ±1.06% 55.04% slower
codec/view_vs_collection.ts[5] Get last element from View 11272.42 ±1.3% 65.41% slower
codec/view_vs_object.ts[0] Get the first field from Decoded 195684.4 ±1.4% 2.4% slower
codec/view_vs_object.ts[1] Get the first field from View 50945.79 ±0.42% 74.59% slower
codec/view_vs_object.ts[2] Get the first field as view from View 50524.83 ±0.37% 74.8% slower
codec/view_vs_object.ts[3] Get two fields from Decoded 196135.28 ±0.66% 2.18% slower
codec/view_vs_object.ts[4] Get two fields from View 40417.91 ±0.45% 79.84% slower
codec/view_vs_object.ts[5] Get two fields from materialized from View 81553.97 ±0.48% 59.32% slower
codec/view_vs_object.ts[6] Get two fields as views from View 40440.12 ±0.46% 79.83% slower
codec/view_vs_object.ts[7] Get only third field from Decoded 200499.12 ±0.53% fastest ✅
codec/view_vs_object.ts[8] Get only third field from View 49648.75 ±0.41% 75.24% slower
codec/view_vs_object.ts[9] Get only third field as view from View 48946.65 ±1.51% 75.59% slower
collections/map_vs_sorted.ts[0] Map 119706.75 ±0.65% fastest ✅
collections/map_vs_sorted.ts[1] Map-array 46646.5 ±0.13% 61.03% slower
collections/map_vs_sorted.ts[2] Array 54876.67 ±0.25% 54.16% slower
collections/map_vs_sorted.ts[3] SortedArray 83103.1 ±0.18% 30.58% slower
collections/hash-dict-vs-blob-dict_delete.ts[0] StringHashDictionary 2629.38 ±0.41% 1.97% slower
collections/hash-dict-vs-blob-dict_delete.ts[1] BlobDictionary(1) 2648.93 ±0.35% 1.24% slower
collections/hash-dict-vs-blob-dict_delete.ts[2] BlobDictionary(2) 2673.58 ±0.33% 0.32% slower
collections/hash-dict-vs-blob-dict_delete.ts[3] BlobDictionary(3) 2682.24 ±0.36% fastest ✅
collections/hash-dict-vs-blob-dict_delete.ts[4] BlobDictionary(4) 2634.49 ±0.57% 1.78% slower
collections/hash-dict-vs-blob-dict_delete.ts[5] BlobDictionary(5) 2518.2 ±1.92% 6.12% slower
collections/hash-dict-vs-blob-dict_get.ts[0] StringHashDictionary 3041.08 ±0.35% fastest ✅
collections/hash-dict-vs-blob-dict_get.ts[1] BlobDictionary(1) 3019.73 ±0.5% 0.7% slower
collections/hash-dict-vs-blob-dict_get.ts[2] BlobDictionary(2) 3032.43 ±0.42% 0.28% slower
collections/hash-dict-vs-blob-dict_get.ts[3] BlobDictionary(3) 3026.34 ±0.39% 0.48% slower
collections/hash-dict-vs-blob-dict_get.ts[4] BlobDictionary(4) 2897.04 ±1.95% 4.74% slower
collections/hash-dict-vs-blob-dict_get.ts[5] BlobDictionary(5) 2981.93 ±0.62% 1.95% slower
collections/hash-dict-vs-blob-dict_set.ts[0] StringHashDictionary 2197.54 ±0.45% 0.05% slower
collections/hash-dict-vs-blob-dict_set.ts[1] BlobDictionary(1) 2198.71 ±0.37% fastest ✅
collections/hash-dict-vs-blob-dict_set.ts[2] BlobDictionary(2) 2191.51 ±0.41% 0.33% slower
collections/hash-dict-vs-blob-dict_set.ts[3] BlobDictionary(3) 2115.29 ±1.75% 3.79% slower
collections/hash-dict-vs-blob-dict_set.ts[4] BlobDictionary(4) 2186.76 ±0.71% 0.54% slower
collections/hash-dict-vs-blob-dict_set.ts[5] BlobDictionary(5) 2195.83 ±0.57% 0.13% slower
hash/blake2b.ts[0] our hasher 1.07 ±0.19% fastest ✅
hash/blake2b.ts[1] blake2b js 0.03 ±0.21% 97.2% slower
crypto/ed25519.ts[0] native crypto 5.67 ±1.03% fastest ✅
crypto/ed25519.ts[1] wasm lib 2.2 ±1.38% 61.2% slower
crypto/ed25519.ts[2] wasm lib batch 2.16 ±0.31% 61.9% slower

Benchmarks summary: 83/83 OK ✅

@tomusdrw tomusdrw added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 49d3333 Mar 18, 2026
14 checks passed
@tomusdrw tomusdrw deleted the maso-refine-ext-export branch March 18, 2026 14:36
@coderabbitai coderabbitai Bot mentioned this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants