diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-04-30 01:02:44 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-04-30 01:09:48 +0200 |
| commit | ea9464fccd26783564e852f10212fc9ce850c5ff (patch) | |
| tree | aca90bfd97ff0b6fd81b8726a8f44216ab9443fa /internal/testhelpers/assert/assert.go | |
| parent | 71d4c873bd12233b585637404115cfea9462c904 (diff) | |
| download | go-oblast-ea9464fccd26783564e852f10212fc9ce850c5ff.tar.gz | |
benchmark: provide a handwritten N=1 implementation for InsertAndDelete
As I had expected, this removes an unfair disadvantage for Oblast, which
had to maintain two differently-typed slices for Insert() and Delete().
This is not really a fair comparison since usually you would not be
doing both operations in one go.
For Gorp, this rewrite is neutral. But in a shocking twist, Gorm somehow
does _significantly_ worse with a specialized N=1 implementation:
```
BenchmarkInsertAndDelete/N=1/via_Gorm-24
before: 11508 B/op 157 allocs/op
after: 12840 B/op 172 allocs/op
```
Diffstat (limited to 'internal/testhelpers/assert/assert.go')
0 files changed, 0 insertions, 0 deletions
