So I was trying to measure the time two different algorithm implementations took to accomplish a given task, and here is the result:
i alg1 alg2
4 0.00
You could instrument the code and count the number of bytecodes executed. You can do this with bycounter.
This may not be ideal for your purposes. If the programs differ by only a very few bytecodes it may not give an accurate measure of which program is actually more performant, as the cost of executing bytecodes can vary wildly. Also, if there is network or disk reads during your program, the bytecode count could give the wrong comparison.