Yes, but in reality it's much less than 100ms. It depends if there are new 
imports or not but usually is around 3-7ms :P There are multiple things that 
goes into this.

  * NimScript is not Nim (<https://nim-lang.org/docs/nims.html>)
  * Im cheating because Im talking about (re)compilation and also I only use 
one "scratchpad" file. There is a nice side effect of using the VM which is 
that you can re-eval the script without destroying the ModuleGraph. Meaning you 
can keep throwing things at it. In the VM bindings I have 1M+ LoC and it keeps 
reloading ultra fast because it only needs to feed the graph once. The 
initialisation (first evaluation) does take time though. Notice the first 
evaluation happens when you create a binary too. If you want to isolate it, you 
can use the flag `compileOnly`
  * NUE has a dynamic bindings mechanism that allows to create functions in 
other parts of the app (DLLs) without restarting the VM. Without it wouldnt be 
that useful
  * I also built things in a way where I can copy->paste NimScript into native 
Nim (NUE's DSL has two "backends")


Reply via email to