README prettifying

This commit is contained in:
Aliaksandr Valialkin
2015-11-28 17:28:26 +02:00
parent d8c882d360
commit 895d083879
+3 -3
View File
@@ -89,9 +89,9 @@ BenchmarkServerGet10KReqPerConn1KClients-4 5000000 359 ns/op
`go tool pprof --alloc_objects your-program mem.pprof` usually gives better
insights for optimization opportunities than `go tool pprof your-program cpu.pprof`.
* Write [tests and benchmarks](https://golang.org/pkg/testing/) for hot paths.
* Avoid conversion between []byte and string, since this may result in memory
allocation+copy. Fasthttp API provides functions for both []byte and string -
use these functions instead of converting manually between []byte and string.
* Avoid conversion between `[]byte` and `string`, since this may result in memory
allocation+copy. Fasthttp API provides functions for both `[]byte` and `string` -
use these functions instead of converting manually between `[]byte` and `string`.
* Verify your tests and production code under
[race detector](https://golang.org/doc/articles/race_detector.html) on a regular basis.