OK, I'll admit - you've got me puzzled. How can a multi-pass operation (in the average case) like sorting be faster than a single traverse of a list - even with a hash lookup thrown in?
# After writing the data to a file and then timing a ``system "sort -u + nums.txt > /dev/null"'' Elapsed time (hash): 0.707023 seconds Elapsed time (disk sort): 7.108102 seconds
-- Education is not the filling of a pail, but the lighting of a fire. -- W. B. Yeats
In reply to Re^2: need for speed - how fast is a hash
by oko1
in thread need for speed - how fast is a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |