Chromium Code Reviews

Unified Diff: src/compiler/mips64/instruction-selector-mips64.cc

Issue 1019463003: MIPS: Tweak constants to be in favor of table switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips64/instruction-selector-mips64.cc
diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc
index 707d3d2c7e6a7d9b6da140ab5fd49abd1ca7bcbc..3eebdb43a59e9d8c5efa1378f18b0d1d1fa596c8 100644
--- a/src/compiler/mips64/instruction-selector-mips64.cc
+++ b/src/compiler/mips64/instruction-selector-mips64.cc
@@ -968,7 +968,7 @@ void InstructionSelector::VisitSwitch(Node* node, BasicBlock* default_branch,
// Determine whether to issue an ArchTableSwitch or an ArchLookupSwitch
// instruction.
size_t table_space_cost = 10 + 2 * value_range;
- size_t table_time_cost = 10;
+ size_t table_time_cost = 3;
size_t lookup_space_cost = 2 + 2 * case_count;
size_t lookup_time_cost = case_count;
if (case_count > 0 &&
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine