mirror of
https://github.com/golang/go
synced 2024-11-24 23:27:57 -07:00
5ee7ef90cd
Use gobs to serialize indexes instead of encoding/binary. Even with gobs, serialize data in slices instead of applying gob to the entire data structure at once, to reduce the amount of extra buffer memory needed inside gob. 7x faster Write/Read for new BenchmarkSaveRestore compared to old code; possibly because encoding/binary is more expensive for int32 slice elements (interface call to get little/big endian encoding), while gob's encoding is fixed (unconfirmed). new (using gobs): suffixarray.BenchmarkSaveRestore 1 2153604000 ns/op old (using encoding/binary): suffixarray.BenchmarkSaveRestore 1 15118322000 ns/op The actual serialized data is slightly larger then using the old code for very large indices because full 32bit indices require 5bytes using gobs instead of 4bytes (encoding/binary) in serialized form. R=r CC=golang-dev https://golang.org/cl/5087041 |
||
---|---|---|
.. | ||
cmd | ||
lib9 | ||
libbio | ||
libmach | ||
pkg | ||
all-qemu.bash | ||
all.bash | ||
clean.bash | ||
env.bash | ||
make.bash | ||
Make.ccmd | ||
Make.clib | ||
Make.cmd | ||
Make.common | ||
Make.inc | ||
Make.pkg | ||
quietgcc.bash | ||
run.bash | ||
sudo.bash | ||
version.bash |