The biggest change this release is BENCHMARKS. Cache benchmarks. This release sets the baseline for all future CPU cache optimizations going forward.
The loop below will be used to benchmark and optimize Ballistic for the next couple releases. No new ARM instructions are being actively implemented for the foreseeable future.
// X1 = Accumulator
MOVZ X0, #0x9896
MOVK X0, #0x80, LSL #16 // X0 = 10,000,000
MOVZ X1, #0
.loop:
SUBS X0, X0, #1 // Decrement counter and set flags
ADD X1, X1, X0 // Accumulate
B.NE .loop
RETBenchmark Metrics
This benchmark simulated a 4KB D1 and 32KB L2 CPU cache. It ran 3.43 billion instructions, 1.2 billion data reads, 721 million writes. But look at the misses:
- L1 Data miss: 175,635 out of 1.2 billion reads.
- DRAM miss: 38126.
I'm sure your able to see this benchmark only compiles and runs one basic block over and over again, so Ballistic's block cache system isn't being stressed, which means these cache miss numbers don't mean much. Once block linking gets implemented and more complex benchmarks start taking shape, the cache misses will explode. But all that matters we finally have a baseline for performance. I've been working on this engine blindly for half a year without knowing its actual speed.
ARM Translation Support
Ballistic Tier 1 compiler now fully support translating these ARM instructions:
- ADD Imm
- ADD Reg
- ADDS Imm
- ADDS Reg
- B.COND
- CBZ
- CNBZ
- SUB Imm
- SUB Reg
- SUBS Imm
- SUBS Reg
Full Changelog: v0.6.0...v0.7.0