This could be due to the script itself, but even if the script was written efficiently it could be due to the fact that mIRC script is an interpreted language and paint is compiled.

Interpreted languages are usually MUCH slower than compiled ones.