pixelherodev opened a new pull request, #559:
URL: https://github.com/apache/arrow-go/pull/559

   Regenerates the flatbuf package using the optimized flatbuffer compiler 
[here](https://github.com/pixelherodev/flatbuffers/tree/opt). It's a pretty 
straightforward patch; it basically just passes internal values along the stack 
instead of by pointers (which necessitates heaps allocations).
   
   I know editing generated code is usually not looked on super favorably, but 
IMO the performance win is sufficient to justify it.
   
   Also addresses the `// FIXME(sbinet) refactor msg-header handling.`; with 
the Table exposed directly (which it should be since it can be modified via 
.Init anyways!), we can just use e.g. msg.Header(&foo.Table) instead of needing 
the initFB helper.
   
   Before:
   
   ```
   BenchmarkIPC/Writer/codec=plain-24            223521      5303 ns/op    8160 
B/op         91 allocs/op
   BenchmarkIPC/Reader/codec=plain-24            223260      4752 ns/op    6130 
B/op         83 allocs/op
   BenchmarkIPC/Writer/codec=zstd-24               5019    300874 ns/op 2338732 
B/op        150 allocs/op
   BenchmarkIPC/Reader/codec=zstd-24              37974     28207 ns/op   25877 
B/op        194 allocs/op
   BenchmarkIPC/Writer/codec=lz4-24               96709     11894 ns/op   13021 
B/op        134 allocs/op
   BenchmarkIPC/Reader/codec=lz4-24              120859      9945 ns/op   10155 
B/op        124 allocs/op
   ```
   
   After:
   
   ```
   cpu: AMD Ryzen 9 7900X3D 12-Core Processor          
   BenchmarkIPC/Writer/codec=plain-24            213406      5856 ns/op    8160 
B/op         91 allocs/op
   BenchmarkIPC/Reader/codec=plain-24            270422      4526 ns/op    5780 
B/op         69 allocs/op
   BenchmarkIPC/Writer/codec=zstd-24               5756    335170 ns/op 2338710 
B/op        150 allocs/op
   BenchmarkIPC/Reader/codec=zstd-24              42300     25984 ns/op   25470 
B/op        178 allocs/op
   BenchmarkIPC/Writer/codec=lz4-24              112836     10816 ns/op   12701 
B/op        134 allocs/op
   BenchmarkIPC/Reader/codec=lz4-24              140852      9199 ns/op    9677 
B/op        108 allocs/op
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to