If I have a program say:
fun foo x =
let
fun bar y = y * y
in
x + (bar x)
end
foo 123;
When I run this program in SML/NJ without compiling, will it have to process the declaration of bar
each
time foo
is called? As it would in an interpreted language.
Will it run slower than
fun bar y = y * y
fun foo x = x + (bar x)
foo 123;
Since value bindings get updated when each time you call a function this question has been brought to my mind.
Or will SML solve this in some neat way under the hood?