Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zhixian001/go-benchmarks


https://github.com/zhixian001/go-benchmarks

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# Go Benchmakrs

## Usage

```go
tests := make(map[string]*tester.TestEntry)

tests["Test A"] = &tester.TestEntry{
Function: func() { myFuncA(argA, argB) },
}

tests["Test B"] = &tester.TestEntry{
Function: func() { myFuncB(argA, argB) },
}

tester.BenchmarkFunctions(&tests, 100, true, true)
```

## Useful Commands

### Build with gccgo auto vectorization

```bash
go build -compiler=gccgo -gccgoflags="-O3 -march=native -ffast-math"
go build -compiler=gccgo -gccgoflags="-O3 -march=core-avx2 -ffast-math"
go build -compiler=gccgo -gccgoflags="-O3 -march=haswell -ffast-math"
```