resp icon indicating copy to clipboard operation
resp copied to clipboard

Freeze API and focus on speed

Open xiam opened this issue 10 years ago • 1 comments

I think the API won't suffer more changes, so it would be a great time to freeze it and maybe move it from my personal repo to an organization.

We also have some benchmarks too that are sufficient but not too great, sometimes resp is slower than encoding/json:

PASS
BenchmarkJSONMarshalString   1000000          1079 ns/op
BenchmarkRESPMarshalString   1000000          1239 ns/op
BenchmarkJSONMarshalBytes    1000000          1381 ns/op
BenchmarkRESPMarshalBytes    1000000          1011 ns/op
BenchmarkJSONMarshalInteger  1000000          1029 ns/op
BenchmarkRESPMarshalInteger  2000000           846 ns/op
BenchmarkJSONMarshalArrayString  1000000          1635 ns/op
BenchmarkRESPMarshalArrayString   500000          2947 ns/op
BenchmarkJSONMarshalArrayBytes   1000000          1754 ns/op
BenchmarkRESPMarshalArrayBytes   1000000          2359 ns/op
BenchmarkJSONMarshalArrayInteger     1000000          1781 ns/op
BenchmarkRESPMarshalArrayInteger      300000          4606 ns/op
BenchmarkJSONMarshalArrayArray    300000          4789 ns/op
BenchmarkRESPMarshalArrayArray    200000         10370 ns/op
BenchmarkJSONUnmarshalString     1000000          1624 ns/op
BenchmarkRESPUnmarshalString     1000000          1514 ns/op
BenchmarkJSONUnmarshalBytes   500000          2995 ns/op
BenchmarkRESPUnmarshalBytes  1000000          1465 ns/op
BenchmarkJSONUnmarshalInteger    1000000          1514 ns/op
BenchmarkRESPUnmarshalInteger    1000000          1288 ns/op
BenchmarkJSONUnmarshalArrayString     500000          3820 ns/op
BenchmarkRESPUnmarshalArrayString     200000          6302 ns/op
BenchmarkJSONUnmarshalArrayBytes      500000          3882 ns/op
BenchmarkRESPUnmarshalArrayBytes      300000          4501 ns/op
BenchmarkJSONUnmarshalArrayInteger    300000          4680 ns/op
BenchmarkRESPUnmarshalArrayInteger    200000          9024 ns/op
BenchmarkJSONUnmarshalArrayArray      100000         13248 ns/op
BenchmarkRESPUnmarshalArrayArray      100000         20489 ns/op
ok      github.com/xiam/resp    45.971s

xiam avatar May 23 '15 11:05 xiam

Need to keep focusing on this, specially after https://github.com/xiam/resp/pull/7

xiam avatar Jul 23 '15 03:07 xiam