| > Where Viua stands in terms of performance for both generated code speed and compilation speed? The performance is, frankly, abysmal. At this time you shouldn't use Viua if what you need is execution speed, as I haven't spent much time optimising the VM.
Compilation speed is a different matter. I only provide an assembler so the "compilation" process is simple and straightforward, and shouldn't take long. Separate compilation is available, although a bit awkward, which should help. The assembler supplied with Viua does not perform any optimisations on source code. I don't use any library for register allocation. The bytecode is not compiled to native code so I can just supply whatever number of register a function needs. I haven't planned building a JIT compiler for the code, but I thought about it. Don't expect it any time soon as I don't have the chops to do it right ;-) The long term plans and goals... Ah, these deserve a separate post. The shortest possible summary: I do not plan to take the part in speed arms race; what I want for the VM is to provide best-in-class correctness and reliability.
That wasn't always the case (and it shows if you know where to look), but now every feature and change is evaluated in the light of "How can X help with writing correct programs?". The same for VM's source code. I compiles warning-free, it doesn't leak memory. It does not contain UB. I am not able to provide you with the greatest performance out there, but I can give some correctness guarantees - this is where I focus with the development of the VM. |