Skip to content

feat(perf): cleanup and minor speedups in AVM Ephemeral trees#11852

Merged
IlyasRidhuan merged 1 commit intodb/ts-fr-hash-optsfrom
db/cleanup-speedups-avm
Feb 10, 2025
Merged

feat(perf): cleanup and minor speedups in AVM Ephemeral trees#11852
IlyasRidhuan merged 1 commit intodb/ts-fr-hash-optsfrom
db/cleanup-speedups-avm

Conversation

@dbanks12
Copy link
Contributor

@dbanks12 dbanks12 commented Feb 8, 2025

Cache zero-hashes in static member of ephemeral tree class. Brings Ephemeral forest construction from 20ms down to 10ms.

Copy link
Contributor Author

dbanks12 commented Feb 8, 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.

@dbanks12 dbanks12 force-pushed the db/cleanup-speedups-avm branch from d44707f to 0719cf4 Compare February 10, 2025 01:49
import { strict as assert } from 'assert';
import cloneDeep from 'lodash.clonedeep';

const MAX_TREE_DEPTH = 128;
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this could be a lot smaller - but since it is a linear number of hashes it isnt so bad.

@IlyasRidhuan IlyasRidhuan merged commit a22c542 into db/ts-fr-hash-opts Feb 10, 2025
51 of 53 checks passed
@IlyasRidhuan IlyasRidhuan deleted the db/cleanup-speedups-avm branch February 10, 2025 09:43
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