In VB/VB.Net you can use the visible property and make Photoshop invisible. I don't think it appreciably speeds up the processing but it does seem to help some.
The downside is if your application has some kind of issue and doesn't make Photoshop visible again before quitting. At least in older versions (pre CS3) I experienced Photoshop not showing itself even after stopping and restarting, including re-booting etc. You had to run a program that made it visible again. At least that was my experience.
I don't know if that is still true in CS2/CS3/CS4 however and may not be.
While I haven't done any highly controlled bench marking, I have found that in CS4 (at least the original public release of it), VB.net seemed to outperform java script doing the same thing by about 33%. I did my best to make both as efficient as possible and I just couldn't get the java script stuff to operate as fast. I was surprised. Again, it wasn't as controlled as it should have been, but it was at least consistent.
Another thing that should make the execution more efficient is to make sure the layers palette is either not shown or is collapsed. That actually seems to speed things up quite a bit. The program doesn't have to show all the changes happening in that palette. Of course all pallets that change upon execution of commands should also be closed or collapsed. This should be done even if you are going to minimize and/or hide photoshop too. I'm of the opinion (via observation) that the program knows when these palettes don't need to be updated and so they must avoid doing the code behind the display of the change.
Regards
George Smith