kont v0.1.2 — Pool-based frame reuse #5
hayabusa-cloud
announced in
Announcements
Replies: 1 comment
-
|
Pool-based frame reuse sounds like a solid optimization for performance. If you have any benchmarks or 'before/after' metrics, those would be awesome to see! Keep up the great work on kont. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
The
kontpackage implements delimited continuations and algebraic effects for Go, targeting version 1.26+. It provides two computation representations:Cont[R, A](closure-based CPS type) andExpr[A](defunctionalized representation using an iterative trampoline).Key Additions
This version reduces per-evaluation heap allocations in the
Exprevaluator:sync.Pool-backed acquire/release forEffectFrame,BindFrame,ThenFrame, and internalchainedFramenodesSuspensionreuse acrossResumecalls, saving one allocation per stepidentity[A],identityResume) replacing anonymous closures with static function valuesUsage
Downstream packages that guarantee affine (single-use) evaluation can acquire pooled frames instead of heap-allocating:
What's Changed
Performance:
sync.Poolframe pools forEffectFrame,BindFrame,ThenFrame(perf: pool-based frame reuse and named continuations #4)SuspensionacrossResumecalls, saving one allocation per step (perf: pool-based frame reuse and named continuations #4)Compatibility
This discussion was created from the release kont v0.1.2 — Pool-based frame reuse.
Beta Was this translation helpful? Give feedback.
All reactions