Algorithms can be compared by identifying some basic operation, such as comparisons, and counting them, as a function of the amount of input data.
Programs are much more difficult to compare, because you can't make a fair comparison without controlling all sorts of extraneous variables. On top of that, if any two programmers write programs to do the same thing, one will take longer than the other, by reason of silly little design decisions. I've never seen a significant program that, as first written, didn't have a lot of room for speedup. It's like dipping a towel in water. It comes out sopping wet. If you squeeze it (tune it) you can get a lot of the water out. If you squeeze it harder, you can get more water outyou can get more water out. If you squeeze it really hard, you can get most of the water out, but it will still be damp. There's a tradeoff between the program's speed and how hard you try to tune it, and that's a variable that's hard to control between programs.