Re: [Sablevm-user] SableVM question
Brought to you by:
egagnon
From: Etienne M. G. <eg...@j-...> - 2000-08-29 14:04:41
|
Hi Marcel. Here's another set of benchmarks that you can use as a basis for your tests. It contains enough bytecodes so that gcc uses a table to encode the switch statement, yet it is small enough so that inspection the assembly code is simple. I have included the "gcc -O2 -S" assembly output. You will see how the switch based approach has significant overhead over the goto based one. If you do time measurements, you should replace the "DIV" opcode by something that compiles to less code. Maybe replace it by a "ADD7" opcode. Just make sure that gcc doesn't get too clever and optimize out your opcodes (which is unlikely to happen in a java interpreter). Etienne -- ---------------------------------------------------------------------- Etienne M. Gagnon, M.Sc. e-mail: eg...@j-... Author of SableVM: http://www.sablevm.org/ ---------------------------------------------------------------------- |