instructions per second?
Scott M
Posts: 43
Does anyone have information that shows how many VM operations the Javelin can do per second - or better yet, the execution time for each opcode? I know that a line of Java doesn't translate to a single opcode, but I'm prepared to disassemble the compiled output. I'm trying to find out exactly how much I can get away with in a 1/10th of a second. Thanks.
Comments
In a tight for-next loop you can read about a 1000 bytes per second
from a character array, so in 0.1 second you can read about 100 bytes.
That is with no operations applied to the bytes.
int i;
char x;
char[noparse]/noparse buf = new char[noparse][[/noparse]10000];
for (i=0; i<10000;; i++) {
· x = buf[noparse][[/noparse]i];
}
regards peter
·
It would be a help, I think, if we had a native method for
·· serout.sendBytes(char[noparse]/noparse data, int startingOffsetInArray, int numberToSend)
to go with serout.sendString(String s);
It's very natural to create an array (often a circular buffer) of things you want to send; not so natural to manipulate Strings to get the same sort of effect. But creating an array inevitably means some code like
··· serout.sendByte(data[noparse][[/noparse]i]); //for lots of values of i
and that, clearly, is very, very·slow...
http://groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/core/
In this class the buffer is defined as a public char array, which means you can fill
up that buffer directly from your code, and only after·you set head (so·head != tail) the uart VP
starts transmitting. Alone the fact that it is a char array alaready speeds up
throughput. If you store·your output data directly in the transfer buffer
instead of your own array first, throughput is even better.
regards peter
PS: that class supports parity. If you remove the parity support the read and write methods
get even tighter.
·