So profile and optimize your code after switching to fasthttp. For instance, use quicktemplate instead of html/template. See also fasthttputil, fasthttpadaptor and expvarhandler. Performance optimization tips for multi-core systems Use reuseport listener. Run a separate server instance per CPU core ...
fasthttp, VictoriaMetrics等组件的作者 valyala可谓是把slice复用这个技巧玩上了天,具体可以看fasthttp主页上的Tricks with[]bytebuffers这部分介绍。 概要的总结起来就是:[]byte这样的数组分配后,不要释放,然后下次使用前,用slice=slice[:0]来清空,继续使用其上次分配好的cap指向的空间。 这篇中文的总结也非常不错:...
fasthttp, VictoriaMetrics等组件的作者valyala可谓是把slice复用这个技巧玩上了天,具体可以看fasthttp主页上的Tricks with []byte buffers这部分介绍。 概要的总结起来就是:[]byte这样的数组分配后,不要释放,然后下次使用前,用slice=slice[:0]来清空,继续使用其上次分配好的cap指向的空间。 这篇中文的总结也非常不错...
fasthttp, VictoriaMetrics等组件的作者valyala可谓是把slice复用这个技巧玩上了天,具体可以看fasthttp主页上的Tricks with[]bytebuffers这部分介绍。 概要的总结起来就是:[]byte这样的数组分配后,不要释放,然后下次使用前,用slice=slice[:0]来清空,继续使用其上次分配好的cap指向的空间。 这篇中文的总结也非常不错:...
fasthttp - Package fasthttp is a fast HTTP implementation for Go, up to 10 times faster than net/http. fortio - Load testing library and command line tool, advanced echo server and web UI. Allows to specify a set query-per-second load and record latency histograms and other useful stats ...
Bitcask - Bitcask is an embeddable, persistent and fast key-value (KV) database written in pure Go with predictable read/write performance, low latency and high throughput thanks to the bitcask on-disk layout (LSM+WAL). buntdb - Fast, embeddable, in-memory key/value database for Go with ...
fasthttprouter - High performance router forked from httprouter. The first router fit for fasthttp. FastRouter - a fast, flexible HTTP router written in Go. gocraft/web - Mux and middleware package in Go. Goji - Goji is a minimalistic and flexible HTTP request multiplexer with support for ne...
fasthttp - Package fasthttp is a fast HTTP implementation for Go, up to 10 times faster than net/http. fortio - Load testing library and command line tool, advanced echo server and web UI. Allows to specify a set query-per-second load and record latency histograms and other useful stats ...