dimanche 6 novembre 2016

Testing sorting and sorting algorithms in python

I made up quiet a few sorting and searching algorithms and modified some previous ones(for example using the binary search with 2 or 3 pivots instead of one).

I wanted to test them and I managed to count the number of steps taken by each algorithm but I wanted to time them as well(some steps can take much longer than the others) so I used a basic timer using time.time() but many people say that it is not a good way of timing algorithms.How can I time each one to compare their efficiency and speed?

P.S: I'm using python

Aucun commentaire:

Enregistrer un commentaire