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
{{ message }}
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
Memoization and/or singletons with lazy initializtion are very useful patterns and important performance optimizations. In Bosque they are also semantics preserving since there is no reference identity. However, implementing them in a functaional language can be hard.
So, we want to implement "optmization pragmas" for functions/methods for singleton and memoize optmizations.
#pragma memoize(cache=256, replace="LRU")
function square(x: Int): Int {
...
}
As shown in the example we want to allow control over the size and replacement policies. We can also check that the arguments are valid for comparison at compile time.
The text was updated successfully, but these errors were encountered:
Memoization and/or singletons with lazy initializtion are very useful patterns and important performance optimizations. In Bosque they are also semantics preserving since there is no reference identity. However, implementing them in a functaional language can be hard.
So, we want to implement "optmization pragmas" for functions/methods for singleton and memoize optmizations.
As shown in the example we want to allow control over the size and replacement policies. We can also check that the arguments are valid for comparison at compile time.
The text was updated successfully, but these errors were encountered: