Tuesday, July 31, 2007

Fun with Stata: Batch Mode (Part II)

Contrary to my initial findings, running Stata in batch mode does not seem to make programs run faster afterall. I ran the same experiment as last time, alternating between running the same program in batch mode and interactive mode. The main difference this time is that the program is longer. Here are the results:

Trial #. batch time, interactive time
1. 4:57, 4:27
2. 7:29, 5:33
3. 5:47, 8:15
4. 9:14, 5:48
5. 8:38, 7:30

The average batch time was 7:13 while the average interactive time was 6:19 so, if anything, batch mode seems to be slower for longer programs. Darn! The experiment was done under realistic conditions rather than "clean" conditions since I had to use the computer for other things while running the tests (which is probably why there is a lot of variation in the times) so this isn't a conclusive result but it's enough for me to stop using batch mode.

The most interesting result here is how much variance there is in times. I didn't expect this to be the case since I have a dual-core processor which makes it easier to run multiple applications at the same time. The large variance is actually good news since it means there's potentially a lot of room for figuring out how to make Stata run faster. Furthermore, the best lead for trying to reduce times is in figuring out why it was so fast in first trial!





No comments: