L1VM - benchmark 06

I did write a small benchmark running on my L1VM and Node.js. It adds double floating point numbers in a loop.

Here are the results I got:

Node.js
=======

$ time node double-benchm-06.js
start...
1
273000000456

real	1m27,913s
user	1m29,480s
sys	0m0,657s


L1VM JIT compiler
=================

$ time l1vm double-benchm-jit-06 -q
273000000456.0000000000

real	1m33,978s
user	1m33,792s
sys	0m0,010s


L1VM no JIT-compiler !!!
========================

$ time l1vm double-benchm-06 -q
273000000456.0000000000

real	0m56,549s
user	0m56,477s
sys	0m0,008s

The benchmarks did run on this CPU:
Intel(R) Core(TM) i5-9300HF CPU @ 2.40GHz


UPDATE: Friday 06-17: I was just curious how fast the L1VM would be without it’s JIT-compiler.
The result did surprise me. I never thought it will be faster without the JIT compiled code!!!
Now the L1VM is way ahead of Node.js running the same calculations loop. This is awesome!
So my L1VM execution engine is faster than the JIT-compiled code in this case.

I did write the whole L1VM (JIT-compiler) alone. If you compare this to the Node.js (V8 JIT-compiler) made by Google, Red Hat and other companies and developers, then you realize the insane difference!
Maybe they did spend countless man hours to make the V8 JIT-compiler output code fast.

And on the other side it’s me, a self taught software developer with no CS degree at all!
I did spend a lot time reading scientific papers about VM design. There are a few good sources out there.

UPDATE: Saturday 06-18: I did change the maxloop to: 2400000000Q and did run the benchmarks. Now Node.js is faster than the L1VM:

maxloop: 2400000000Q

Node.js
=======

$ time node double-benchm-06.js
start...
1
1092000000456

real	6m6,960s
user	6m9,409s
sys	0m1,973s


L1VM
====
$ time l1vm double-benchm-06 -q
1092000000456.0000000000

real	6m28,902s
user	6m27,291s
sys	0m0,093s


L1VM JIT-compiler
=================
$ time l1vm double-benchm-jit-06 -q
1092000000456.0000000000

real	6m24,596s
user	6m23,034s
sys	0m0,097s

And the JIT-compiled code is a bit faster than the normal L1VM. I think the Node.js can do more optimizations to the code, if the run time is longer.

L1VM benchmark 06 01


L1VM benchmark 06 02

Here is the benchmark archive: benchmark-06-double