Commit Graph

23 Commits

Author SHA1 Message Date
Robert 781c39c708 Fix 32bit-system integer overflow (test only)
For #277
2015-09-25 13:57:17 -07:00
Bruno Bigras edb3b9c307 Remove duplicate Go test 2015-09-21 17:51:16 -04:00
rw 4d305f5922 Panic when nesting strings. Test panic scenarios.
Also add a new `insideObject` boolean to the Builder to track whether an
object is currently being constructed. This fixes a bug with objects
that have zero fields.
2015-06-24 11:53:44 -04:00
rw 0894c25f2c Improve comment for unicode check. 2015-05-20 14:19:49 -07:00
rw 7810fb9ce4 use escape codes here for non-unicode editors 2015-05-20 13:42:51 -07:00
rw c127cf78c2 Go: CreateString now needs zero allocs.
Big speed boost for the typical use case of building with strings.
2015-05-20 12:00:44 -07:00
Robert 4d213c2d06 Merge pull request #165 from rw/go-faster
Go speed improvements
2015-05-12 14:53:31 -07:00
rw 3dd54424c0 remove remaining allocs during build 2015-05-09 16:07:11 -07:00
Ben Harper 8b99bf614c Add byte slice accessor to Go code
Change-Id: I15cc8924d6607bd93068c762fd67e6088cfd9789
2015-04-06 11:44:22 -07:00
Kyle Jones c4a3e2f6bd Always add additional space if no more is available
Change-Id: If08b2d839489d40e977de794b13584fa66ff32c1
2015-04-06 11:44:22 -07:00
rw d756efbf76 Reduce allocations when reusing a Builder.
Add the function `Reset` to the Builder, which facilitates reuse of the
underlying byte slice.
2015-04-02 19:33:00 -07:00
rw ace7fa8094 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.
2015-04-02 18:22:13 -07:00
rw f02646e357 Remove all string allocations during parsing.
Change the signature for 'string' getters and settings to use byte
slices instead of strings.
2015-04-02 11:56:55 -07:00
rw 0a3a09aaf3 Merge branch 'go-bytevector-getter' of github.com:benharper123/flatbuffers into go-faster 2015-04-02 11:47:17 -07:00
rw 796be3282c Benchmarks for building and parsing 'gold' data.
Identifies alloc-heavy codepaths.
2015-04-02 11:26:00 -07:00
Ben Harper 8fb6c4f764 Add byte slice accessor to Go code 2015-04-01 16:47:10 +02:00
Ben Harper 6a0126340a Add CreateByteVector function to Go's builder
This function gets around the inefficiency of populating a [ubyte] vector
byte by byte. Since ubyte vectors are probably the most commonly used type
of generic byte buffer, this seems like a worthwhile thing to create a
fast path for.

Benchmarks show a 6x improvement in throughput on x64.

There is a new test verifying the functionality of the function.

Change-Id: I82e0228ae0f815dd7ea89bf168b8c1925f3ce0d7
2015-03-11 17:27:39 -07:00
loverszhaokai 432f3f26a4 Added Copyright headers
Change-Id: I106de8985cea572590d49c896b72c54f33e73bd2
2015-03-11 17:27:38 -07:00
Wouter van Oortmerssen 18cf19f876 Fixed bug in convenient constructors for Java/C#
Also fixed Go unit tests not being up to date with recent schema
changes.

Change-Id: I42e619f9c5ea05f6f937c68a5c8a92462c46bce3
Tested: on Linux and Windows.
2014-09-25 15:53:56 -07:00
rw ef03cf46e4 Fix vector of strings for Go
Mirrors Java patch 39d4b7e2bf

Change-Id: If8d0ab29f6eb508a156d468aeb0a9d5410149e53
2014-09-23 17:25:50 -07:00
rw 417cb878c3 Fixed possible alignment issue in Go
Java patch with same purpose:
cdb0dca39d

Change-Id: I57d268cc0064843779eb7812a9e69326d9ab2498
Tested: on Darwin
2014-09-04 17:35:08 -07:00
rw 0477a54f65 Tweak Go test.
Add more comments explaining the tests. Remove the extraneous 'superFuzz'
functionality. By default, do not compare to generated Java files.

Change-Id: Icb0aa8262e10035958639f9a88ca666694a2ce73
2014-07-25 15:26:00 -07:00
rw 74d5f3701f Port FlatBuffers to Go.
Implement code generation and runtime library for Go, derived from the
Java implementation. Additionally, the test suite verifies:

 - the exact bytes in the Builder buffer during object construction,
 - vtable deduplication, and
 - table construction, via a fuzzer derived from the C++ implementation.

Change-Id: Ib95a019c684891def2b50281e570b4843fea7baa
2014-07-21 16:40:39 -07:00