BGA
Second Officer
Offline
|
I am pretty sure the S1 is running a custom Python interpreter that is *WAY* slower than any Python interpreter has the right to be considering the hardware it is running on. Here are some random notes I collected.
- Empty loop runs at 178 FPS.
In other words:
while True:
pass
This is absurdely slow. This should be several orders of magnitude faster than it is. Note this is the fastest possible loop one can write.
- Just enabling S1 Robot identification (without using it) reduces it to 169 FPS (the interpreter appears to be using some cooperative scheduler to run things).
- Reading the identified robot list, without any robots being identified reduces it further to 143 FPS.
- Reading with one robot identified, 139 FPS (but this might just be noise form the above or the extra cost of reading the data).
- Using the recognition interrupts (they are not callbacks as I though originally), they get called at 5 FPS.
- When as interrupt is called, the caller aborts whatever instruction is being executed and hands it over to the interrupt code. When the interrupt code returns it goes back to the next instruction after the one it was executing.
|
|