Last time we said that there’s a serious problem with our language implementation. What was it?

- It lacks a representation for compound values like tuples and lists.
- It depends on Racket-specific features.
- It is too lazy.
- It is too eager.
- It is too slow.
- It uses too much space.
- It uses substitutions.

OK, so the problem is that it’s too slow. Can you be more specific?

- The cost of
*a function call is*`O(n²)`

for functions with a body of*size*n. - The cost of
*a function call*is`O(n²)`

for functions with a body of*depth*n. - The cost of
*a function call*is`O(n)`

for functions with a body of*size*n. - The cost of
*a function call*is`O(n)`

for functions with a body of*depth*n. - The cost of
*a function call*is`O(2ⁿ)`

for functions with a body of*size*n. - The cost of
*a function call*is`O(2ⁿ)`

for functions with a body of*depth*n. - The cost of
*compiling a function*`O(n²)`

for functions with a body of*size*n. - The cost of
*compiling a function*is`O(n²)`

for functions with a body of*depth*n. - The cost of
*compiling a function*is`O(n)`

for functions with a body of*size*n. - The cost of
*compiling a function*is`O(n)`

for functions with a body of*depth*n. - The cost of
*compiling a function*is`O(2ⁿ)`

for functions with a body of*size*n. - The cost of
*compiling a function*is`O(2ⁿ)`

for functions with a body of*depth*n.

If we have this:

{with {x 3}

{with {f {fun {y} {+ x y}}}

{with {x 5}

{call f 4}}}}

{with {f {fun {y} {+ x y}}}

{with {x 5}

{call f 4}}}}

in the substitution-based evaluator (FLANG, the one with `subst`

),
what would we get?

- runtime error
- type error
- 6
- 7
- 8
- 9
- 10

If we have this:

{with {x 3}

{with {f {fun {y} {+ x y}}}

{with {x 5}

{call f 4}}}}

{with {f {fun {y} {+ x y}}}

{with {x 5}

{call f 4}}}}

in the NEW AND FIXED subst-cache evaluator (the LAST one we just went over, the one with the closures), what would we get?

- runtime error
- type error
- 6
- 7
- 8
- 9
- 10

If we have this:

{with {x 3}

{with {f {fun {y} {+ x y}}}

{with {x 5}

{call f 4}}}}

{with {f {fun {y} {+ x y}}}

{with {x 5}

{call f 4}}}}

in the BROKEN subst-cache evaluator (the one BEFORE we added closures), what would we get?

- runtime error
- type error
- 6
- 7
- 8
- 9
- 10