pure-simdjson is a cgo-free Go wrapper around simdjson with a DOM API, typed number accessors, cursor-style iteration, and bootstrap support for prebuilt native libraries.
go get github.com/amikos-tech/pure-simdjson@latestThe first NewParser() call downloads the platform-native library if it is not already cached locally. Mirror, offline, and override details live in docs/bootstrap.md.
package main
import (
"fmt"
purejson "github.com/amikos-tech/pure-simdjson"
)
func main() {
parser, err := purejson.NewParser()
if err != nil {
panic(err)
}
defer func() { _ = parser.Close() }()
doc, err := parser.Parse([]byte(`{"name":"alice"}`))
if err != nil {
panic(err)
}
defer func() { _ = doc.Close() }()
object, err := doc.Root().AsObject()
if err != nil {
panic(err)
}
name, err := object.GetStringField("name")
if err != nil {
panic(err)
}
fmt.Println(name)
}This snippet is derived from example_test.go.
linux/amd64linux/arm64darwin/amd64darwin/arm64windows/amd64
The current benchmark evidence is published in v0.1.2 results with the benchmark methodology. Comparator tables omit unsupported libraries on a given target instead of showing synthetic N/A rows.
On the linux/amd64 CI target, Tier 1 full any materialization now beats encoding/json + any by 3.15x on twitter.json, 3.39x on citm_catalog.json, and 2.47x on canada.json. Tier 2 typed extraction beats encoding/json + struct by 12.49x to 14.56x, and Tier 3 selective traversal on the current DOM API beats encoding/json + struct by 15.18x to 15.97x. Headline numbers come from linux/amd64; other platforms may differ.
The published default-install version is v0.1.4. The v0.1.2 benchmark snapshot remains the validated baseline because v0.1.3 and v0.1.4 are recovery releases targeting the publish pipeline (manylinux libstdc++ allocator behavior, Linux symbol visibility, macOS allocator-cleanup telemetry) rather than the parse or materialize hot paths. Phase 09.1 owns default-install alignment, and bootstrap details remain in docs/bootstrap.md.