We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm seeing much slower speeds after switching to Processing 2.1. The sketch below runs at 1500-2000 fps on 2.0.3 and only about 400 fps on 2.1. I'm using a Mac Mini running OS X 10.8.5. I don't see the same slowdown on an Ubuntu 13.10 system.
void setup() {
size(640,480);
frameRate(3000); // go as fast as possible
}
void draw() {
color theColor = color(random(255), random(255), random(255));
set (int(random(width)), int(random(height)), theColor);
println(frameRate);
}
Answers
O
Benchmark tweaked version: >:)
Thanks for the timing thread code. That'll come in handy.
If anything, your program highlights the problem with 2.1 even more. Here's what I'm seeing:
2.0.3 set() 2500-3000 fps -- pixels[] 2500-3000 fps
2.1 set() ~400 fps -- pixels[] >10,000 fps
Again, I don't see that kind of discrepancy on Linux, so I'm seeing a radical slowdown in set() on Mac OS. Anyone else?
So weird...
IIRC, there was a recent thread about a similar problem. It seems that 2.0 sets smooth() by default, so perhaps set() is affected, if using anti-aliasing. Try to add a noSmooth() in the sketch, to see if it makes any difference.
PS.: Don't listen to the forum, don't reject answers that you find useful...