Arduin-O-Scope (a tiny oscilloscope project)

The baud rate used is 115200. From that we get maximum data rate of 11520 bytes/sec of 11.52KB.

Now analogRead() returns an integer, ranging from 0 to 1023.
Serial.Print() prints it in ASCII format, which means a maximum of 4 bytes per sample.

So maximum sampling frequency would be 11.52KB/4 = 2.888KHz.

You are limited by serial port transmission rate. Check if Processing allows you to set non-standard baud rate for the serial port.