优化候选排序的无分配路径
This commit is contained in:
@@ -4323,7 +4323,7 @@ fn build_fundamental_universe_for_date(
|
||||
free_float_cap_bn: decision_free_float_cap_bn(factor),
|
||||
});
|
||||
}
|
||||
rows.sort_by(|left, right| {
|
||||
rows.sort_unstable_by(|left, right| {
|
||||
left.market_cap_bn
|
||||
.partial_cmp(&right.market_cap_bn)
|
||||
.unwrap_or(std::cmp::Ordering::Equal)
|
||||
@@ -4406,7 +4406,7 @@ fn build_eligible_universe_for_date_from_factors(
|
||||
free_float_cap_bn,
|
||||
});
|
||||
}
|
||||
rows.sort_by(|left, right| {
|
||||
rows.sort_unstable_by(|left, right| {
|
||||
left.market_cap_bn
|
||||
.partial_cmp(&right.market_cap_bn)
|
||||
.unwrap_or(std::cmp::Ordering::Equal)
|
||||
|
||||
@@ -8976,7 +8976,7 @@ impl PlatformExprStrategy {
|
||||
free_float_cap_bn,
|
||||
});
|
||||
}
|
||||
rows.sort_by(|left, right| {
|
||||
rows.sort_unstable_by(|left, right| {
|
||||
left.market_cap_bn
|
||||
.partial_cmp(&right.market_cap_bn)
|
||||
.unwrap_or(std::cmp::Ordering::Equal)
|
||||
@@ -9562,7 +9562,7 @@ impl PlatformExprStrategy {
|
||||
candidates.push((candidate, stock, rank_value));
|
||||
}
|
||||
if !self.rank_reuses_market_cap_order() {
|
||||
candidates.sort_by(|lhs, rhs| {
|
||||
candidates.sort_unstable_by(|lhs, rhs| {
|
||||
let lhs_value = lhs.2;
|
||||
let rhs_value = rhs.2;
|
||||
let ordering = if self.config.rank_desc {
|
||||
@@ -10204,7 +10204,7 @@ impl PlatformExprStrategy {
|
||||
}
|
||||
candidates.push((candidate.symbol.clone(), rank_value, stock));
|
||||
}
|
||||
candidates.sort_by(|lhs, rhs| {
|
||||
candidates.sort_unstable_by(|lhs, rhs| {
|
||||
let ordering = if self.config.rank_desc {
|
||||
rhs.1
|
||||
.partial_cmp(&lhs.1)
|
||||
|
||||
Reference in New Issue
Block a user