thedevsaddam / gojsonq

A simple Go package to Query over JSON/YAML/XML/CSV Data
https://github.com/thedevsaddam/gojsonq/wiki
MIT License
2.17k stars 140 forks source link

simdjson as decoder #81

Open ricardoper opened 4 years ago

ricardoper commented 4 years ago

Hello,

Please, consider using simdjson as default decoder because the parse times are impresive.

About 50% less time to parse the "189MB-JSON-Document" for the simdjson-go version.

gojsonq - 3.919751905s
simdjson - 2.049345876s

( go1.14.2 linux/amd64 )

Regards, Ricardo Pereira.

kshji commented 1 year ago

faster readfile JSON

jsonq.go:

import: remove "io/ioutil" add "os"

//bb, err := ioutil.ReadFile(filename)
bb, err := os.ReadFile(filename)

io/ioutil: "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os."