diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-06T20·25+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-11T12·26+0000 |
commit | e944c341a78fffe475ddbe866275737a21991dc5 (patch) | |
tree | d3fea8c448269e9e3d4e68e2b9eae4571e137bc3 /tvix | |
parent | 627dfabef1dd3b640d07777de5535d074fb12f19 (diff) |
docs(tvix/eval): add optimisation note on eliminating `with` thunks r/4803
Change-Id: I18d50ac8e157929a027f8bf284e65f1eb8950d5a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6488 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/docs/known-optimisation-potential.md | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tvix/eval/docs/known-optimisation-potential.md b/tvix/eval/docs/known-optimisation-potential.md index da9cf265ea5b..20884519cc44 100644 --- a/tvix/eval/docs/known-optimisation-potential.md +++ b/tvix/eval/docs/known-optimisation-potential.md @@ -50,12 +50,6 @@ optimisations, but note the most important ones here. can directly use the `value::function::Lambda` representation where possible. -* Tail-call optimisation [hard] - - We can statically detect the conditions for tail-call optimisation. - The compiler should do this, and it should then emit a new operation - for doing the tail-calls. - * Optimise inner builtin access [medium] When accessing identifiers like `builtins.foo`, the compiler should @@ -81,3 +75,12 @@ optimisations, but note the most important ones here. For details consult the commit with Gerrit change ID `I96828ab6a628136e0bac1bf03555faa4e6b74ece`, in which the initial attempt at doing this was reverted. + +* Avoid thunks if only identifier closing is required [medium] + + Some constructs, like `with`, mostly do not change runtime behaviour + if thunked. However, they are wrapped in thunks to ensure that + deferred identifiers are resolved correctly. + + This can be avoided, as we statically analyse the scope and should + be able to tell whether any such logic was required. |