Lets try to estimate overhead of JIT compiler
I wrote simple perl script - it just counts redundant bytes for several cases:
- pair mov reg, rbp/add reg, imm (total length 7 bytes) can be replaced with lea reg, [rbp-imm] which is only 4 bytes
- pair mov reg, imm/add reg,imm can be replaced with just loading of right address so second instruction can be removed
- add reg, 1/sub reg, 1 (length 4 bytes) can be replaced to inc/dec reg (which has length 3 bytes)
etc etc
Results