FrameworkBenchmarks icon indicating copy to clipboard operation
FrameworkBenchmarks copied to clipboard

⬆️ Build Fiber with Go-1.19 and `GOAMD64=v3`

Open 0uep opened this issue 1 year ago • 1 comments

  • Bump Go from 1.17 to 1.19: Each Go version improves the performance.
  • Set GOAMD64=v3 to 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 is GOAMD64=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/qtc in the source code. That way Go-1.19 is aware of the dependency on qtc and adds automatically it in the go.mod with a fixed version to reproduce the same go generate.

Note: I insert docker.io/ in the FROM docker.io/golang:1.19 statement to allow podman and buildah to build the container images.

0uep avatar Sep 19 '22 03:09 0uep

  • [x] ./tfb --mode verify --test fiber
  • [x] ./tfb --mode verify --test fiber-prefork
================================================================================
Verification Summary
--------------------------------------------------------------------------------
| fiber-prefork
|       fortune       : PASS
|       plaintext     : PASS
|       db            : PASS
|       update        : PASS
|       json          : PASS
|       query         : PASS
|       cached-query  : PASS
================================================================================

0uep avatar Sep 19 '22 23:09 0uep