Skip to content

Commit

Permalink
Use @BytecodeInterpreterSwitch
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Feb 13, 2025
1 parent dc2dafd commit 55fac51
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.HostCompilerDirectives.BytecodeInterpreterSwitch;
import com.oracle.truffle.api.frame.Frame;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.StandardTags;
Expand Down Expand Up @@ -59,6 +60,7 @@ public Object execute(final VirtualFrame frame, final int startPC) {
/*
* Inspired by Sulong's LLVMDispatchBasicBlockNode (https://git.io/fjEDw).
*/
@BytecodeInterpreterSwitch
@ExplodeLoop(kind = ExplodeLoop.LoopExplosionKind.MERGE_EXPLODE)
private Object interpretBytecode(final VirtualFrame frame, final int startPC) {
CompilerAsserts.partialEvaluationConstant(bytecodeNodes.length);
Expand Down

1 comment on commit 55fac51

@TruffleSqueak-Bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performance Report (55fac51)

Benchmarks ran on 23.0.2-graal.

Steady (after 100 iterations)

Benchmark Name Min Geomean Median Mean Max Total (ms) Total (min)
Bounce 519 561 523.51 520 523.48 104702 1.75
CD 523 541 528.58 524 528.53 105715 1.76
DeltaBlue 169 308 255.88 254 255.52 51176 0.85
Havlak 1231 1292 1263.81 1264 1263.76 252761 4.21
Json 325 346 329.28 326 329.23 65855 1.1
List 319 343 320.73 319 320.68 64145 1.07
Mandelbrot 129 149 131 130 130.95 26200 0.44
NBody 244 283 249.73 246 249.64 49945 0.83
Permute 155 170 156.25 156 156.23 31249 0.52
Queens 214 245 217.26 216 217.2 43452 0.72
Richards 813 852 830.39 832 830.35 166077 2.77
Sieve 172 198 173.37 173 173.33 34673 0.58
Storage 137 154 139.48 138 139.41 27896 0.46
Towers 176 200 178.03 176.5 177.96 35606 0.59
5126 5642 5297.26 5274.5 5296.26 1059452 17.66

55fac51-2-steady.svg

Warmup (first 100 iterations)

55fac51-3-warmup.svg

Please sign in to comment.