mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
README prettifying
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user