Don't... There is some overhead for these functions, and you have to call them several thousands times for a drawing. Even on a small image you can go for coffee while your script runs.
The "fast" interface is called "pixel regions". In one of my recent scripts, it was faster to paint a mask with a patern using a region that to use Gimp's pattern fill. Two examples of use:
My "ofn-tartan" script in
https://sourceforge.net/projects/gimp-t ... s/scripts/ (see the "addmask" function)
My numpy tutorial (you don't need to use numpty of course):
https://www.gimp-forum.net/Thread-Gimp-python-and-numpy