It's software timed so it's going to be slow compared to a more sophisticated device with hardware timing. Since you did not attach your code for done reason, it's impossible to say if it could be sped up. Since you haven't defined what you mean by 'slow' ( ms, s, hours), really hard to judge what your problem is.