@@ -48,10 +48,8 @@ As such, both of these benchmarks are actually just running in the interpreter.
4848** Try it for yourself** : [ Source code] ( tests/data/iterate-for-no-reason-001.js )
4949| Engine | Time Taken |
5050| ----------------------- | -------------------------------------------------------------- |
51- | Bali (Interpreter) | 3.9ms (best case) - 5.9ms (worst case) |
52- | Bali (JIT) | 3.9ms (best case) - 6.0ms (worst case) |
53-
54- This proves that the JIT barely worsens the worst case scenario.
51+ | Bali (Interpreter) | 3.4ms (best case) - 7.9ms (worst case) |
52+ | Bali (JIT) | 3.3ms (best case) - 5.3ms (worst case) |
5553
5654## Finding a substring in a moderately large string
5755Bali's string-find function (` String.prototype.indexOf ` ) is SIMD-accelerated, and as such, is pretty fast.
@@ -63,17 +61,17 @@ As such, both of these benchmarks are actually just running in the interpreter.
6361** Try it for yourself** : [ Source code] ( tests/data/string-find-001.js )
6462| Engine | Time Taken |
6563| -------------------------- | -------------------------------------------- |
66- | Bali (Interpreter) | 4.1ms (best case) - 6.1ms (worst case) |
67- | Bali (JIT) | 4.1ms (best case) - 7.1ms (worst case) |
64+ | Bali (Interpreter) | 3.5ms (best case) - 5.8ms (worst case) |
65+ | Bali (JIT) | 3.5ms (best case) - 5.5ms (worst case) |
6866
6967## JIT-triggering microbenchmark
7068This script is intentionally designed to make Bali's profiling mechanism catch onto it and optimize it.
7169
7270** Try it for yourself** : [ Source code] ( tests/data/trigger-jit-001.js )
7371| Engine | Time Taken |
7472| -------------------------- | -------------------------------------------- |
75- | Bali (Interpreter) | 586.9ms (best case) - 601.3ms (worst case) |
76- | Bali (JIT) | 356.7ms (best case) - 374.5ms (worst case) |
73+ | Bali (Interpreter) | 268.5ms (best case) - 275.5ms (worst case) |
74+ | Bali (JIT) | 162.4ms (best case) - 169.2ms (worst case) |
7775
7876Here, the JIT is ** 1.65x** faster than the interpreter!
7977
0 commit comments