There are (at least) two aspects to your question:
1) What do you mean by "faster"?
2) Once you've established that, how do you test it?
The first is one that you will have to answer: What is a "faster" program depends on what the nature of the program is. If it's a sort, for example, how many items? How sorted before? How linked to other things? etc. For more complex programs, more things can vary. E.g. a program to do regression would vary on a dozen parameters or so. So, you'd have to figure that out. Then you'd have to test the two programs for a variety of conditions. You might have to test more than once for each condition, if there is much variation over time (I don't know if there is).
For 2) it might be possible to do something as simple as a t-test, but probably you will be interested in how the relative speed varies as a function of the parameters. (e.g. program A is faster when there are 10,000,000 items to sort, but B is faster when there are 1,000,000,000 items or something like that). That might call for some sort of regression model
Speed ~ program + parameter1 + parameter2 .....