Using high FPS and Anti-Lag

An example I have comparing points and circles with different renderers:

import processing.javafx.*;  // You have to add this library!

int dia = 100;
boolean toggle;

void setup()
  {
  size(800, 800);
  //size(800, 800, P2D);
  //size(800, 800, P3D);
  //size(800, 800, FX2D);
  
  background(0);
  }
  
int t0, t1, td;  
String txt;  
  
void draw()
  {
  background(0);
  
  surface.setTitle(str(frameRate));
  
  if (toggle)
    {
    txt = "point";
    t0 = millis();
    strokeWeight(3);
    stroke(255);
    for(int i=0; i<10000; i++)
      {
      //stroke(random(256));
      stroke(128*randomGaussian()+128);
      point(random(width), random(height));
      }
    t1 = millis();  
    }
  else
    {
    txt = "circle";  
    t0 = millis();  
    noStroke();
    fill(255);
    for(int i=0; i<10000; i++)
      {
      fill(128*randomGaussian()+128);  
      circle(random(width), random(height), 3);
      }
    t1 = millis();  
    }
  
  println(txt, t1-t0);
  }
  
void keyPressed()  // Select between points and circle
  {
  toggle = !toggle;
  }

References:

:)