FrameworkBenchmarks
FrameworkBenchmarks copied to clipboard
⬆️ Build `go-std` with Go-1.19 and `GOAMD64=v3`
- Upgrade all dependencies
- Bump Go from 1.14 to 1.19: Each Go version improves the performance.
- Set
GOAMD64=v3to enable the following instructions set: CMPXCHG16B, LAHF, SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3, AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE. The default value isGOAMD64=v1. See https://github.com/golang/go/wiki/MinimumRequirements#amd64 - Replace the
RUN go get -u github.com/valyala/quicktemplate/qtc(Dockerfile) by//go:generate go run github.com/valyala/quicktemplate/qtcin the source code. That way Go-1.19 is aware of the dependency onqtcand adds automatically it in thego.modwith a fixed version to reproduce the samego generate. - Replace the
RUN easyjson -pkgby//go:generate go run github.com/mailru/easyjson/... -all -disable_members_unescape ${GOFILE}using-disable_members_unescapefor better performance. - Rename module name from
go-std/srctogo-std/app. This change sets the default executable name to "app". We may also drop the-o appin the Dockerfile.
Note: I insert docker.io/ in the FROM docker.io/golang:1.19 statement to allow podman and buildah to also build the container images.