Reduce allocations when building strings.

Builder has a new CreateByteString function that writes a
null-terimnated byte slice to the buffer. This results in zero
allocations for writing strings.
This commit is contained in:
rw
2015-04-02 18:22:13 -07:00
parent f02646e357
commit ace7fa8094
3 changed files with 27 additions and 14 deletions

View File

@@ -43,8 +43,8 @@ GOPATH=${go_path} go test flatbuffers_test \
--test.coverpkg=github.com/google/flatbuffers/go \
--cpp_data=${test_dir}/monsterdata_test.mon \
--out_data=${test_dir}/monsterdata_go_wire.mon \
--test.bench=. \
--test.benchtime=5s \
--test.bench=Build \
--test.benchtime=3s \
--fuzz=true \
--fuzz_fields=4 \
--fuzz_objects=10000