DEV Community

Discussion on: Golang atomic.AddInt64 not fast ////

Collapse
 
yanmhlv profile image
Yan Mihailov • Edited

Hi YooWaan! You can replace bash command to go-test arguments
instead of using this:

$ for i in $(seq 1 3); do go test -bench . | grep 'ns/op'; done
Enter fullscreen mode Exit fullscreen mode

you can use this:

go test \
    -v \
    -benchtime=10s \
    -benchmem \
    -count=5 \
    -bench=. \
    ./...
Enter fullscreen mode Exit fullscreen mode