Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

kristiansvalland/json-valid-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Json valid benchmark

This repository contains simple code for validating JSON strings to showcase the speed difference between json.Valid and json.Unmarshal(...) == nil

Run benchmarks

make bench

Results

Hardware: cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

Benchmark name Iterations Time per operation Bits allocated per operation Allocations per operation
BenchmarkJsonValid-12 2416996 486.0 ns/op 144 B/op 1 allocs/op
BenchmarkJsonUnmarshalValid-12 645478 1844 ns/op 1152 B/op 19 allocs/op

About

Small test project for benchmarking methods for validating json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published