• Kirill Smelkov's avatar
    tests: Add benchmarks for Decode and Encode · 3979c069
    Kirill Smelkov authored
    - use existing tests vector as input data
    - for Decode we prepare one large pickle stream from testv and decode all pickle from there
    - for Encode we prepare one lirge slice with all objects from testv and encode it
    
    On an i7-6600U currently it looks like:
    
        BenchmarkSpeed-4         5000000               387 ns/op             280 B/op          8 allocs/op
        BenchmarkDecode-4          20000             81892 ns/op           43989 B/op        502 allocs/op
        BenchmarkEncode-4         100000             16711 ns/op            6536 B/op        297 allocs/op
    3979c069
ogorek_test.go 17.6 KB