Made bench great again

This commit is contained in:
Felix Krause 2016-09-21 10:44:40 +02:00
parent 12960b2e31
commit 6bb110b185
4 changed files with 10 additions and 10 deletions

View File

@ -1,8 +1,8 @@
import "../yaml", common import "../yaml", commonBench
from nimlets_yaml import objKind from nimlets_yaml import objKind
import math, strutils, stopwatch, terminal, algorithm, random import math, strutils, stopwatch, terminal, algorithm, random, json
proc cmp(left, right: clock): int = cmp(left.nanoseconds(), right.nanoseconds()) proc cmp(left, right: clock): int = cmp(left.nanoseconds(), right.nanoseconds())

View File

@ -1,5 +1,5 @@
import "../yaml", common import "../yaml", commonBench
import math, strutils, stopwatch, terminal, algorithm, random import math, strutils, stopwatch, terminal, algorithm, random, streams
from nimlets_yaml import objKind from nimlets_yaml import objKind
@ -153,10 +153,10 @@ block:
let res = loadDOM(yaml100k) let res = loadDOM(yaml100k)
assert res.root.kind == yMapping assert res.root.kind == yMapping
block: #block:
multibench(cYaml1m, 2): # multibench(cYaml1m, 2):
let res = loadDOM(yaml1m) # let res = loadDOM(yaml1m)
assert res.root.kind == yMapping # assert res.root.kind == yMapping
block: block:
multibench(cLibYaml1k, 100): multibench(cLibYaml1k, 100):

View File

@ -67,7 +67,7 @@ type
## available from ``parent``. ## available from ``parent``.
proc noLastContext(s: YamlStream, line, column: var int, proc noLastContext(s: YamlStream, line, column: var int,
lineContent: var string): bool = lineContent: var string): bool {.raises: [].} =
(line, column, lineContent) = (-1, -1, "") (line, column, lineContent) = (-1, -1, "")
result = false result = false