I didn't do any serious benchmarking, so i don't know if the execute_array thing did any good. It didn't do any noticeable good, so i reverted to the form above.
I can however say, that using the BEGIN;END; pair gave at least 10 times more speed, but i think that's mostly a SQLite thing.