From a3b19ad8be9809205e018146ccba2a6bad53d605 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 2 Sep 2022 15:46:14 +0300 Subject: docs(tvix/eval): add notes for builtins access optimisation Change-Id: Iadbfbe2864ae42fe5492ef3ede0925baee4872b2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6413 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/docs/known-optimisation-potential.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tvix/eval/docs') diff --git a/tvix/eval/docs/known-optimisation-potential.md b/tvix/eval/docs/known-optimisation-potential.md index 5a08c25eb4..e7271f4b35 100644 --- a/tvix/eval/docs/known-optimisation-potential.md +++ b/tvix/eval/docs/known-optimisation-potential.md @@ -55,3 +55,13 @@ optimisations, but note the most important ones here. 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 + not go through the trouble of setting up the attribute set on the + stack and accessing `foo` from it if it knows that the scope for + `builtins` is unpoisoned. + + The same thing goes for resolving `with builtins;`, which should + definitely resolve statically. -- cgit 1.4.1