You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Logarithmic wrapper for modeling logarithmic complexity
Add a new Logarithmic newtype wrapper in ExMemoryUsage that transforms
size measures logarithmically. This enables linear cost models to
effectively capture O(log n) runtime behavior by measuring log(size)
instead of size directly.
The wrapper computes max(1, floor(log2(size) + 1)) from any wrapped
ExMemoryUsage instance, making it composable with existing size measures
like ValueOuterOrMaxInner for operations with logarithmic complexity.
This infrastructure supports proper costing of Value builtins like
lookupCoin which has O(log max(m, k)) complexity.
0 commit comments