Tao Wen
75810179f6
remove n from stream
2018-02-14 13:58:51 +08:00
Brian Brazil
1e8e785321
Remove allocs from WriteFloat32/WriteFloat64
...
The use of strconv.FormatFloat causes a string allocation,
by setting aside a reusable buffer and using strconv.AppendFloat
this can be avoided.
Before:
BenchmarkRespond-4 300 5392189 ns/op 618936 B/op 20010 allocs/op
After:
BenchmarkRespond-4 300 4713746 ns/op 139744 B/op 10 allocs/op
This benchmark is using a custom encoder that calls WriteFloat64 20k
times, which is the bulk of the work.
2018-02-07 17:30:57 +00:00
Tao Wen
b1b003864e
expose OptionalEncoder&OptionalDecoder; add attachment to Stream&Iterator for customized decoder/encoder
2017-11-08 11:41:45 +08:00
MOZGIII
14b28b2226
Used writeTwoBytes in Stream.WriteEmptyArray
2017-10-03 22:14:36 +03:00
Tao Wen
dbb1ef3f63
#177 flush buffer should check available again
2017-09-21 21:04:45 +08:00
Tao Wen
6a4fbb9892
ensure buffer flushed to io.Writer
2017-07-16 10:47:24 +08:00
Tao Wen
f0487718f6
document public symbols
2017-07-09 16:09:23 +08:00
Tao Wen
5862c51768
extract out feature_reflect_struct_decoder
2017-07-09 15:07:53 +08:00
Tao Wen
ce479f3476
fix golint: document exported symbols
2017-07-09 14:57:49 +08:00
Tao Wen
bede1d7f40
fix build; add document for exported symbols
2017-07-09 14:48:34 +08:00
Tao Wen
678c297af3
#75 support MarshalIndent
2017-06-29 20:48:27 +08:00
Tao Wen
5f22e50c89
#53 support escapeHtml
2017-06-15 23:55:04 +08:00
Tao Wen
d867c8ba5c
#53 split config into Config and frozenConfig
2017-06-13 18:49:35 +08:00
Tao Wen
d0418857ce
#53 move current config EnableXXX
2017-06-13 17:47:40 +08:00
Tao Wen
48e9f6ec84
move IndentionStep to config
2017-06-13 17:03:27 +08:00
Tao Wen
acddcf5bbf
#53 extract out config
2017-06-13 16:58:53 +08:00
Tao Wen
cfffa29c8a
gofmt
2017-06-06 23:27:00 +08:00
Tao Wen
dcb78991c4
flush when buffer is large enough
2017-06-06 14:16:54 +08:00
Tao Wen
a4e5abf492
support []byte; marshal without copy
2017-06-06 09:44:56 +08:00
Tao Wen
2922666717
fix read int
2017-02-07 09:24:36 +08:00
Tao Wen
9c2b1d24b3
optimize true/false/null:
2017-01-22 19:28:14 +08:00
Tao Wen
1163c348f6
fix write string
2017-01-22 00:04:08 +08:00
Tao Wen
8345c731dd
rename
2017-01-21 17:11:38 +08:00