Hover over the triangles Press up / down to do timings for 30,000 tests
Having seen @TheLogFather's take on the algorithm, I decided I'd revise my current algorithm to reflect some of his ideas I included a timing test and found that in general @thelogfather's generally came out slightly faster, but there was a lot of overlap in readings so I couldn't get a definite result Even if a result had been reached however, it would still have to be treated with a grain of salt - both these algorithms are optimised for certain cases, and it is very difficult to produce a testing suite that allows the 'average' case. Here, I used random values from -20 to 20 for all the inputs in the hope of achieving 'average'.