• Clayton Coleman's avatar
    Correct benchmarks for unstructured, show json-iter · d0daa108
    Clayton Coleman authored
    The unstructured benchmarks incorrectly charged setup of objects to the benchmark.
    
    Split each, and add comparison to json iter.
    
    ```
    BenchmarkToUnstructured-12                 	   30000	     49716 ns/op	   15358 B/op	     221 allocs/op
    BenchmarkFromUnstructured-12               	   30000	     53585 ns/op	    7773 B/op	     185 allocs/op
    BenchmarkToUnstructuredViaJSON-12          	   30000	     53716 ns/op	   22609 B/op	     323 allocs/op
    BenchmarkFromUnstructuredViaJSON-12        	   10000	    121007 ns/op	   29601 B/op	     438 allocs/op
    BenchmarkToUnstructuredViaJSONIter/compat-12         	   30000	     57796 ns/op	   27685 B/op	     431 allocs/op
    BenchmarkToUnstructuredViaJSONIter/default-12        	   30000	     51114 ns/op	   20377 B/op	     415 allocs/op
    BenchmarkToUnstructuredViaJSONIter/fastest-12        	   30000	     48521 ns/op	   20103 B/op	     405 allocs/op
    BenchmarkFromUnstructuredViaJSONIter/compat-12       	   20000	     83389 ns/op	   48777 B/op	     591 allocs/op
    BenchmarkFromUnstructuredViaJSONIter/default-12      	   30000	     42717 ns/op	   13439 B/op	     291 allocs/op
    BenchmarkFromUnstructuredViaJSONIter/fastest-12      	   50000	     35102 ns/op	   12070 B/op	     203 allocs/op
    ```
    d0daa108