diff --git a/bench/json.nim b/bench/json.nim index fbab365..6aaee14 100644 --- a/bench/json.nim +++ b/bench/json.nim @@ -134,27 +134,27 @@ var json1k = genJsonString(1, 32) json10k = genJsonString(10, 32) json100k = genJsonString(100, 32) - tagLib = coreTagLibrary + tagLib = initCoreTagLibrary() s = newStringStream(json1k) - + parser = newYamlParser(initCoreTagLibrary()) block: bench(cYaml1k): - let res = constructJson(fastparse(coreTagLibrary, s)) + let res = constructJson(parser.parse(s)) assert res[0].kind == JObject s = newStringStream(json10k) block: bench(cYaml10k): - let res = constructJson(fastparse(coreTagLibrary, s)) + let res = constructJson(parser.parse(s)) assert res[0].kind == JObject s = newStringStream(json100k) block: bench(cYaml100k): - let res = constructJson(fastparse(coreTagLibrary, s)) + let res = constructJson(parser.parse(s)) assert res[0].kind == JObject block: