difference between selection and quicksort

so im sorting a list of numbers contaning different numbers like 2000,4000 0r 6000 numbers and sorting them from small to large. and both are working but i know the big 0's of quick sort is nlogn and selection is n(square)
but why when i run the time command i get for 4000
quicksort
real 0m0.415s
user 0m0.015s
sys 0m0.018s

and selection sort
real 0m0.116s
user 0m0.031s
sys 0m0.014s
i get selection sort faster and i have run it with different amounts of number 2000,4000,6000,8000 and i still get selection sort faster
can anybody explain why???
thanks
can anybody explain why???
Poor implementation. Even at n=2000, quicksort should be in the order of 100 times faster.
Topic archived. No new replies allowed.