2 ms·
Have you updated the benchmarks with Go 1.1? How does it compare to other buffer packages? http://godoc.org/github.com/cznic/bufs http://godoc.org/github.com/c
by vanderZwan 14y ago
Have you updated the benchmarks with Go 1.1?
How does it compare to other buffer packages?
http://godoc.org/github.com/cznic/bufs http://godoc.org/github.com/cznic/bufs
http://godoc.org/github.com/kotokoko/chihaya/bufferpool http://godoc.org/github.com/kotokoko/chihaya/bufferpool
- songgao 14y agoThis one is not exactly "buffer" as shown in the two links. It uses a custom structure data type instead of []byte, to avoid conversion between actual data and []byte (marshaling) or type assertion (conversion from/to interface{}). Check https://github.com/songgao/bufferManager.go/blob/master/buffered/data.go https://github.com/songgao/bufferManager.go/blob/master/buff... , inside Data there can be anything. The internal implementation is closer to `bufferpool` (2nd one) though, since they both use a channel as the pool. As to performance in GO 1.1, I did try it with this implementation but have not updated result to Github. The speedup is similar. You could simply clone the repo and run `run_test.sh` yourself :-)
- vanderZwan 14y agoVery clear answer! Apologies for being lazy and just thinking "ooh, buffer, like the other packages with the name buffer" without digging into the sources, and thanks for answering anyway :)