Page 1 of 1

number of instructions limitation

Posted: Fri Oct 24, 2008 6:52 pm
by CrappySnafu
Hi folk

i am interested in to know how this limitation is defined. is this 500.000 java instructions?

Code: Select all

for (int i = 0;i<500000;i++)

now limit reached? ;) if not, is it possible to measure the number of instructions?


thx for answer

Posted: Fri Oct 24, 2008 10:13 pm
by adum
hey there. the limit is the number of actual bytecode instructions. a loop like

Code: Select all

for (int i = 0;i<500000;i++)
will typically produce about 3 instructions per iteration, so you'll get through about 150000 items before reaching the limit. you can disassemble java code to see what things are doing if you're interested. also, switching on info in the simulator will tell you how many instructions you use each step.

Posted: Sun Oct 26, 2008 10:05 am
by CrappySnafu
ah, the bytecode is counting

thx for answer.

also thx for the tipp about the simulator, didn't noticed before.