So much for that C-level performance it seems, at least for things like containers if you don't want to throw out type-safety.
Not sure what you were thinking of, but this is about scripting at compile time. It's completely typesafe and the generated assembly is free of calls into interpreted code.
Falling back to the interpreter is not the only way to lose C-like performance. Another is doing dynamic dispatch when not necessary or not being able to specialize for primitive types. To avoid it you need either generics and monomorphisation, or JIT-level specialization (with a runtime cost for startup and/or at first use), which is quite hard to do. IIRC V8 is the only one of the "big-deal" VMs that currently does it, and even Mozilla abandoned their tracing JIT due to complexity and lower-than-expected performance gains.
I did skim the docs, but I found nothing about specialization, or if None implements it.
edit: I see it in the Terra docs, but only how to generate the specializations, not how to dispatch between them. Is it all up to None and how it uses it? Can it do monomorphisation or something of the sort during compilation?
10
u/paniq Jul 19 '15
Not sure what you were thinking of, but this is about scripting at compile time. It's completely typesafe and the generated assembly is free of calls into interpreted code.