From e4204f082d7af5822f50d1fccfe54921434145a7 Mon Sep 17 00:00:00 2001 From: Erwan Ameil Date: Sat, 20 Dec 2014 18:36:11 +0100 Subject: [PATCH] Additional perf boost for Nim --- nim.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nim.nim b/nim.nim index 3f67249..309c869 100644 --- a/nim.nim +++ b/nim.nim @@ -26,7 +26,7 @@ proc readPlaces: tuple[nodes: seq[Node], num: int] = return (nodes, numNodes) -proc getLongestPath(nodes: seq[Node], nodeId: int, visited: var seq[bool]): int = +proc getLongestPath(nodes: openarray[Node], nodeId: int, visited: var openarray[bool]): int = visited[nodeId] = true for neighbour in nodes[nodeId].neighbours: if not visited[neighbour.dest]: