我有以下Java代码(所有数组在我们调用“arrays”之前都已初始化,并且所有数组的大小均为“arraySize”)
int arraySize = 64;
float[] a;
float[] b;
float[] result;
public void arrays() {
for (int i = 0; i < arraySize; i++) {
result[i] = ((a[i] * b[i] + b[i] - b[i]) / b[i]) +
a[i] + a[i] + a[i] + a[i];
}
}
Run Code Online (Sandbox Code Playgroud)
JIT 的输出是:
# {method} {0x00000001034751a8} 'arrays' '()V' in 'main/ComplexExpression'
# [sp+0x30] (sp of caller)
[Entry Point]
0x000000010c4c55a0: mov 0x8(%rsi),%r10d
0x000000010c4c55a4: movabs $0x800000000,%r11
0x000000010c4c55ae: add %r11,%r10
0x000000010c4c55b1: cmp %r10,%rax
0x000000010c4c55b4: jne 0x000000010c44b780 ; {runtime_call ic_miss_stub} …Run Code Online (Sandbox Code Playgroud)