Switch order of merge_sort arguments in some benchmarks

This commit is contained in:
Simon BD 2012-09-27 20:44:31 -05:00
parent f34c4f4b04
commit 4f9f1c5f9a
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ fn pct(xx: uint, yy: uint) -> float {
// sort by key, then by value // sort by key, then by value
fn sortKV<TT: Copy Ord, UU: Copy Ord>(orig: ~[(TT,UU)]) -> ~[(TT,UU)] { fn sortKV<TT: Copy Ord, UU: Copy Ord>(orig: ~[(TT,UU)]) -> ~[(TT,UU)] {
return sort::merge_sort(le_by_val, sort::merge_sort(le_by_key, orig)); return sort::merge_sort(sort::merge_sort(orig, le_by_key), le_by_val);
} }
let mut pairs = ~[]; let mut pairs = ~[];

View File

@ -31,7 +31,7 @@ fn pct(xx: uint, yy: uint) -> float {
// sort by key, then by value // sort by key, then by value
fn sortKV<TT: Copy Ord, UU: Copy Ord>(orig: ~[(TT,UU)]) -> ~[(TT,UU)] { fn sortKV<TT: Copy Ord, UU: Copy Ord>(orig: ~[(TT,UU)]) -> ~[(TT,UU)] {
return sort::merge_sort(le_by_val, sort::merge_sort(le_by_key, orig)); return sort::merge_sort(sort::merge_sort(orig, le_by_key), le_by_val);
} }
let mut pairs = ~[]; let mut pairs = ~[];