Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions docs/release-notes/release-notes-0.8.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Release Notes
- [Bug Fixes](#bug-fixes)
- [New Features](#new-features)
- [Functional Enhancements](#functional-enhancements)
- [RPC Additions](#rpc-additions)
- [tapcli Additions](#tapcli-additions)
- [Improvements](#improvements)
- [Functional Updates](#functional-updates)
- [RPC Updates](#rpc-updates)
- [tapcli Updates](#tapcli-updates)
- [Config Changes](#config-changes)
- [Breaking Changes](#breaking-changes)
- [Performance Improvements](#performance-improvements)
- [Deprecations](#deprecations)
- [Technical and Architectural Updates](#technical-and-architectural-updates)
- [BIP/bLIP Spec Updates](#bipblip-spec-updates)
- [Testing](#testing)
- [Database](#database)
- [Code Health](#code-health)
- [Tooling and Documentation](#tooling-and-documentation)

# Bug Fixes

# New Features

## Functional Enhancements

## RPC Additions

## tapcli Additions

# Improvements

## Functional Updates

## RPC Updates

## tapcli Updates

## Config Changes

## Code Health

## Breaking Changes

## Performance Improvements

- [PR#2188](https://github.com/lightninglabs/taproot-assets/pull/2188)
dramatically improves the performance of batched MS-SMT insertions.

## Deprecations

# Technical and Architectural Updates

## BIP/bLIP Spec Updates

## Testing

## Database

## Code Health

## Tooling and Documentation

# Contributors (Alphabetical Order)
44 changes: 44 additions & 0 deletions mssmt/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,47 @@ func BenchmarkTree(b *testing.B) {
return mssmt.NewCompactedTree(mssmt.NewDefaultStore())
})
}

// BenchmarkInsertManyPopulated measures a single InsertMany call against a
// CompactedTree that already holds `seed` leaves. The existing tree-wide
// InsertMany benches only ever ran against a fresh tree; this one exposes
// the populated-tree path, where the phase-split reform removed the O(N)
// per-key pre-walk from the overflow check.
func BenchmarkInsertManyPopulated(b *testing.B) {
ctx := context.Background()

for _, seed := range []int{1_000, 10_000} {
for _, batch := range []int{100, 1_000} {
name := fmt.Sprintf("seed=%d/batch=%d", seed, batch)
b.Run(name, func(b *testing.B) {
b.ReportAllocs()

for i := 0; i < b.N; i++ {
b.StopTimer()
tree := mssmt.NewCompactedTree(
mssmt.NewDefaultStore(),
)
for _, item := range randTree(seed) {
_, err := tree.Insert(
ctx, item.key,
item.leaf,
)
require.NoError(b, err)
}
batchLeaves := randTree(batch)
m := make(
map[[32]byte]*mssmt.LeafNode,
batch,
)
for _, item := range batchLeaves {
m[item.key] = item.leaf
}
b.StartTimer()

_, err := tree.InsertMany(ctx, m)
require.NoError(b, err)
}
})
}
}
}
Loading
Loading