From 41e916a511f37848168a3cddf7cbd1ea1a9ba8da Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 14 Aug 2016 11:58:47 +0900 Subject: [perf] evaluateBonus can start from sidx - 1 --- src/util/util.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/util/util.go') diff --git a/src/util/util.go b/src/util/util.go index a95340e7..113fee91 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -10,14 +10,11 @@ import ( ) // Max returns the largest integer -func Max(first int, items ...int) int { - max := first - for _, item := range items { - if item > max { - max = item - } +func Max(first int, second int) int { + if first >= second { + return first } - return max + return second } // Min returns the smallest integer -- cgit v1.2.3