L1VM - the story
L1VM - the story
The L1VM project started on 9. November 2017 as an experimental fast VM. I had some knowledge already from my Nano VM project. But I started from scratch.
I did develop Nano VM before. The main disadvantage was the execution speed: it was slow! It has hundreds of opcodes. Everything was build in the binary. So it already was difficult to maintain.
One day I did start my text editor and wrote some new code. Then I had this new idea. What happens if I put all variables into one byte array? Like I did it for the VM opcodes.
I did write a program, hard coded into my new VM code. It was a loop counting to about 100000 or so.
I did wait for the program to finish. Now something special happened. I could not believe what I did see now.
The new VM code was seven times faster than Nano VM! At this time I did stop developing my Nano VM project.
I did design a new opcode set with about 60 opcodes. The L1VM has a RISC like CPU.
I did work on the new VM L1VM in my free time. I did develop an assembler and later wrote a new programming language: Brackets. At the beginning I did set four design rules:
- be small
- be fast
- be simple
- be modular
Now, If I look back, I think it was worth to start from scratch. I did learn a lot. And when I look at the support I get on GitHub, then I’m glad to be part of this.