number of instructions limitation

Post Reply
CrappySnafu
Posts: 12
Joined: Fri Oct 24, 2008 2:50 pm
Location: Switzerland

number of instructions limitation

Post 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
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post 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.
CrappySnafu
Posts: 12
Joined: Fri Oct 24, 2008 2:50 pm
Location: Switzerland

Post by CrappySnafu »

ah, the bytecode is counting

thx for answer.

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