please post your hardware and software specs, and your testing code.
Oh and OSX El Capitan. Forgot to say that. Thanks.
Mario will have more definitive information, however i would guess that the behaviour you are seeing is due to the crappy integrated graphics in your machine (is it a 13" MBP with Intel 4000 graphics?), or a video driver bug.
are you using any external monitors? how much RAM does your machine have?
and do you have the PsychToolboxKernelDriver installed?
my machine does not show that behaviour, so it's either a limitation of your machine, or a bug.
This is greatly simplified, but as a mental model: When you execute Screen or OpenGL drawing commands, the graphics driver translates those into low-level commands which your graphics hardware can understand and then submits them into a command queue. At the discretion of the driver, command buffers from that queue get transmitted to the hardware into another hardware queue, from which the gpu then pulls and processes commands at its own pace. In that sense the drawing commands are "queued" after processing by the graphics driver in memory and then sent to the gpu's own 2nd queue for parallel background processing when the driver decides to do so.
The driver will submit batches of commands to the gpu when the in-memory queue is filled to some threshold and the hardware queue has enough space. It will usually also submit when the queue is partially full, but the driver decides it is efficient to do so. Or after some driver dependent timeout if the queue is only filled with a few commands, too little for efficient operation. Screen('Drawingfinished') or a Screen('Flip') under certain circumstances, e.g., when you specify a Flip 'when' target time in the future, will cause PTB to execute a glFlush() command to forcibly flush the software OpenGL command queue. At the latest, the driver will flush the queue when a Screen('Flip') is pending, as obviously all drawing work must complete before a new drawn image can be flipped onto the scanout.
Most of the details of this behaviour is highly os/driver/gpu dependent, but in general this means you can't time the execution of Screen() or glXXX drawing command via tic; toc; or GetSecs, as you are only measuring command submission time on the cpu, not the actual rendering work on the gpu. Our DrawingSpeedTest script has an optional flag 'gpuMeasurement' you can set to 1 to measure actual execution time on the gpu. Obviously also if you implement that code in your own script.
The numbers you get for a Intel HD-4000 Ivybridge are expected for the workload you submit to such a gpu with a theoretical maximum memory bandwidth of 25 GB/sec.
Oh and in general, if you overdraw a pixel n times, then the GPU will execute the drawing n times, although there are tons of optimizations in modern drivers and hardware that will avoid redundant operations, or at least reduce their execution cost, under certain circumstances. Most of these optimizations apply to typical 3D rendering with a depth buffer though, not to pure 2D drawing as you'd typically do with Screen() drawing commands.
One example of such an optimization relating to your script: PTB will translate a FillRect for the complete onscreen window into a glClear() call under many - but not all - circumstances, as glClear is potentially optimized by the hardware to be faster than just filling a "normal" rectangle with pixels of a certain color. Graphics drivers may optimize that glClear further under suitable circumstances. E.g., the Intel graphics driver on Linux will execute a fast-clear on modern Intel graphics chips like yours, iff the clear color is selected to clear to either black (r,g,b = 0,0,0) or white, to speed up the operation even more. It will also detect that you are clearing the framebuffer redundantly with the same color and only execute your first FillRect, discard all others as redundant. The Intel graphics driver on all versions of OSX isn't so clever and executes a slower clear on the same hardware, and doesn't detect redundancy. Performance can be highly OS dependent this way.
Hope it helps,
-mario