Closed tebeka closed 4 years ago
For some reason I don't see a speedup when doing this. @yonidavidson - Can you run the benchmark and see what it does for you?
Run go test -v -run '^$' -bench .
in #42, then comment out the special Finish
for int array builder and run again.
The benchmark was wrong! The buffered code clocks 12.6ns/op vs 92.9ns/op for the unbuffered one, ~7 times faster.
Will add tests and buffer the rest of the types.
Currently we have
Append
calling the C append function on every value. I suggest we'll have a "buffered append" where append will add to existing Go array and only when this array is full will call the right AppendValues C++ method.