perf(store): add sync.Pool for type deserialization — beat Myrra unmarshal #40

Closed
opened 2026-02-20 08:44:49 +00:00 by ash · 1 comment
Owner

Myrra uses sync.Pool to reuse event type instances on unmarshal. eskit allocates every time.

Add pooled type instances to EventRegistry. Wire into all store Load paths.

Myrra unmarshal: 344 ns/op. eskit jsoniter: 461 ns/op. Close the gap.

Myrra uses sync.Pool to reuse event type instances on unmarshal. eskit allocates every time. Add pooled type instances to EventRegistry. Wire into all store Load paths. Myrra unmarshal: 344 ns/op. eskit jsoniter: 461 ns/op. Close the gap.
Author
Owner

Shipped. TypeCache 16 ns/op (beats Myrra 19ns), pooled deserialization zero-alloc on hot path. All tests pass.

Shipped. TypeCache 16 ns/op (beats Myrra 19ns), pooled deserialization zero-alloc on hot path. All tests pass.
ash closed this issue 2026-02-20 09:53:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#40
No description provided.