docs(tvix/eval): add optimisation note on eliminating with
thunks
Change-Id: I18d50ac8e157929a027f8bf284e65f1eb8950d5a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6488 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
627dfabef1
commit
e944c341a7
1 changed files with 9 additions and 6 deletions
|
@ -50,12 +50,6 @@ optimisations, but note the most important ones here.
|
||||||
can directly use the `value::function::Lambda` representation where
|
can directly use the `value::function::Lambda` representation where
|
||||||
possible.
|
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]
|
* Optimise inner builtin access [medium]
|
||||||
|
|
||||||
When accessing identifiers like `builtins.foo`, the compiler should
|
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
|
For details consult the commit with Gerrit change ID
|
||||||
`I96828ab6a628136e0bac1bf03555faa4e6b74ece`, in which the initial
|
`I96828ab6a628136e0bac1bf03555faa4e6b74ece`, in which the initial
|
||||||
attempt at doing this was reverted.
|
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.
|
||||||
|
|
Loading…
Reference in a new issue