Skip to content

replaceShortenedKeysInBranch: less re-allocs#19584

Merged
AskAlexSharov merged 7 commits intomainfrom
alex/shortened_key_buf_34
Mar 4, 2026
Merged

replaceShortenedKeysInBranch: less re-allocs#19584
AskAlexSharov merged 7 commits intomainfrom
alex/shortened_key_buf_34

Conversation

@AskAlexSharov
Copy link
Collaborator

old aux buffer often did re-alloc (16children * 32hashlen = 368 > 256)

  ┌───────────────────┬────────┬────────┬───────────┐
  │      Pattern      │ ns/op  │  B/op  │ allocs/op │
  ├───────────────────┼────────┼────────┼───────────┤
  │ fresh-make (old)  │ 315 ns │ 1408 B │ 2 allocs  │
  ├───────────────────┼────────┼────────┼───────────┤
  │ reuse-clone (new) │ 248 ns │ 704 B  │ 1 alloc   │
  └───────────────────┴────────┴────────┴───────────┘

@AskAlexSharov AskAlexSharov enabled auto-merge (squash) March 3, 2026 09:46
@AskAlexSharov AskAlexSharov marked this pull request as draft March 3, 2026 10:00
auto-merge was automatically disabled March 3, 2026 10:00

Pull request was converted to draft

@AskAlexSharov AskAlexSharov marked this pull request as ready for review March 4, 2026 03:39
@AskAlexSharov AskAlexSharov enabled auto-merge (squash) March 4, 2026 05:22
@AskAlexSharov AskAlexSharov merged commit 08da24e into main Mar 4, 2026
38 checks passed
@AskAlexSharov AskAlexSharov deleted the alex/shortened_key_buf_34 branch March 4, 2026 05:39
sudeepdino008 pushed a commit that referenced this pull request Mar 4, 2026
old `aux` buffer often did re-alloc (16children * 32hashlen = 368 > 256)
```
  ┌───────────────────┬────────┬────────┬───────────┐
  │      Pattern      │ ns/op  │  B/op  │ allocs/op │
  ├───────────────────┼────────┼────────┼───────────┤
  │ fresh-make (old)  │ 315 ns │ 1408 B │ 2 allocs  │
  ├───────────────────┼────────┼────────┼───────────┤
  │ reuse-clone (new) │ 248 ns │ 704 B  │ 1 alloc   │
  └───────────────────┴────────┴────────┴───────────┘
```
sudeepdino008 pushed a commit that referenced this pull request Mar 4, 2026
old `aux` buffer often did re-alloc (16children * 32hashlen = 368 > 256)
```
  ┌───────────────────┬────────┬────────┬───────────┐
  │      Pattern      │ ns/op  │  B/op  │ allocs/op │
  ├───────────────────┼────────┼────────┼───────────┤
  │ fresh-make (old)  │ 315 ns │ 1408 B │ 2 allocs  │
  ├───────────────────┼────────┼────────┼───────────┤
  │ reuse-clone (new) │ 248 ns │ 704 B  │ 1 alloc   │
  └───────────────────┴────────┴────────┴───────────┘
```
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