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
If all branches can be determined to be constants at compile-time, then we can just eval all of them into a static simple-vector at compile-time, thus getting O(1) dispatch on all implementations.
There should also be a way to use a similar strategy if not all the branches are constant, but a certain threshold of the branches are (75%?). In that case, we do the O(1) dispatch into the simple-vector, and we get a distinguished value (e.g. a special private symbol) if that branch is not a constant, and then we proceed to distinguish among the non-constant cases with the main strategy.
The text was updated successfully, but these errors were encountered:
If all branches can be determined to be constants at compile-time, then we can just eval all of them into a static simple-vector at compile-time, thus getting O(1) dispatch on all implementations.
There should also be a way to use a similar strategy if not all the branches are constant, but a certain threshold of the branches are (75%?). In that case, we do the O(1) dispatch into the simple-vector, and we get a distinguished value (e.g. a special private symbol) if that branch is not a constant, and then we proceed to distinguish among the non-constant cases with the main strategy.
The text was updated successfully, but these errors were encountered: