From c16ecd51380dbaeca5b21ca424ddb94d0c845a7d Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Fri, 18 Jan 2019 15:06:23 -0500 Subject: [PATCH] A --- jsonchecker/pass14.json | 1 + scripts/data/skylake/allpasteandrotate.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 jsonchecker/pass14.json create mode 100644 scripts/data/skylake/allpasteandrotate.py diff --git a/jsonchecker/pass14.json b/jsonchecker/pass14.json new file mode 100644 index 000000000..8ae2a7f30 --- /dev/null +++ b/jsonchecker/pass14.json @@ -0,0 +1 @@ +{"string with backandquote \\\"":1, "string with back\\":2} diff --git a/scripts/data/skylake/allpasteandrotate.py b/scripts/data/skylake/allpasteandrotate.py new file mode 100644 index 000000000..4ae70b3ee --- /dev/null +++ b/scripts/data/skylake/allpasteandrotate.py @@ -0,0 +1,23 @@ +import os +import csv + +try: import pandas as pd +except ImportError: + import pip + pip.main(['install', '--user', 'pandas']) + import pandas as pd + +def getdata(filename): + df = pd.read_csv(filename, delim_whitespace=True) + return (df["gb_per_s"].tolist()) + +ourdir=os.path.dirname(os.path.realpath(__file__)) +answer = [] +for file in os.listdir(ourdir): + if file.startswith("all") and file.endswith(".table"): + fullpath = os.path.join(ourdir, file) + answer.append([file[3:-11]]+getdata(fullpath)) +print(" \t&\t simdjson \t&\t RapidJSON \t&\t RapidJSONinsitu \t&\t sajsondyn \t&\t sajson \t&\t dropbox-json11 \t&\t fastjson \t&\t gason \t&\t ultrajson \t&\t jsmn\t&\t cJSON \\\\") +answer.sort() +for l in answer: + print("\t&\t".join(map(lambda x : (('{:.2f}'.format(x) if x < 1 else '{:.1f}'.format(x) ) if (type(x) is float) else x),l))+"\\\\")