i use encoding/binary package for testing the binary write/read speed, but
it reach 12MB/s at most.
What is the fastest way to read/write binary file using go?
source code:
type Action struct {
U1 uint64
U2 uint64
U3 uint64
}
f, _ := os.Create("test.dat")
defer f.Close()
w := bufio.NewWriter(f)
var action Action
for {
binary.Write(w, binary.LittleEndian, &action)
}
--