Skip to content

v0.3.1

Choose a tag to compare

@kiplagatcollins kiplagatcollins released this 28 Nov 10:50
· 15 commits to main since this release

Performance (allocation-reduction pass)

  • Single-row Create is no longer wrapped in a synthetic BEGIN/COMMIT when the write is provably one statement (no relations, no hooks, no multi-chunk batch) — halves the common-case write path.
  • Scan loop: amortized slice growth (appendOne) replaces reflect.Append+Set; time.Time values scan via typed assignment instead of boxing through reflect.ValueOf; RETURNING integer ids scan typed rather than through any.
  • Per-row hot paths: insert SQL built directly (no intermediate clause.Values/Expression), timestamps set with typed assignment, hook presence checked via a precomputed flag (no per-row MethodByName reflection), ON CONFLICT targets carry no strings.Split per build.
  • Chain/finisher paths use copy-on-append condition slices, a shared COUNT(*) select, Statement.SkipTimestamps instead of a sync.Map setting, and schema lookup by reflect.Type without instantiating a throwaway model. Callback execution bookkeeping uses an indexed slice instead of a map.
  • Measured (in-memory SQLite, interleaved A/B/C runs): fusion geomean now leads bun by ~8% and gorm by ~28% across 11 operations; allocs/op down 30-97% per operation (Pluck 2067→57, FindAll 9798→4797, Create 86→46).