Go micro-benchmarks for calculating the speed of language constructs

== About ==

Gospeed is a library of micro-benchmarks for Go which evolved from the GoLightly project. It's main
utility is for understanding and reasoning about the performance of Go programs.


== Usage ==

Download the repo to a convenient location in your $GOPATH and then run the benchmarks with:

	go test -v -test.bench=".*" -test.timeout="60m"

the sixty minute timeout may be necessary when running the entire benchmark suite or portions which
make significant use of channels as the default aggregate test timeout is ten minutes.
Owner
Eleanor McHugh
Presenter of Ruby and Go oddities, author of http://leanpub.com/GoNotebook, digital identity researcher and co-founder at @inidsol_uk.
Eleanor McHugh
Similar Resources

TLEService is a microservice for calculating satellite orbits.

TLEService is a microservice for calculating satellite orbits.

tleservice TLEService is a microservice for calculating satellite orbits. This is not an official Google product. Intro TLE is a data format for descr

Nov 9, 2021

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths.

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths.

A Golang program for a colleague to help in calculating the ratio between the points obtained in a test and the corresponding evaluation in tenths. If you have not the compiled file (.exe) you can build it with the Go compiler.

Jul 7, 2022

Go library for calculating the Nutri-Score of foods and beverages.

nutriscore Go library for calculating the Nutri-Score Based on https://www.santepubliquefrance.fr/content/download/150263/file/2021_07_21_QR_scientifi

Dec 23, 2021

cmd tool for automatic storage and comparison of benchmarks results

prettybenchcmp prettybenchcmp is cmd tool for storage and comparison of benchmarks results. There is a standard tool benchcmp, but I don't think that

Apr 6, 2021

Benchmarks of Go serialization methods

Benchmarks of Go serialization methods This is a test suite for benchmarking various Go serialization methods. Tested serialization methods encoding/g

Jan 1, 2023

Go Machine Learning Benchmarks

Go Machine Learning Benchmarks

Benchmarks of machine learning inference for Go

Dec 30, 2022

benchmarks for implementation of servers which support 1 million connections

Benchmark for implementation of servers that support 1m connections inspired by handling 1M websockets connections in Go Servers 1_simple_tcp_server:

Jan 5, 2023

Robust framework for running complex workload scenarios in isolation, using Go; for integration, e2e tests, benchmarks and more! 💪

e2e Go Module providing robust framework for running complex workload scenarios in isolation, using Go and Docker. For integration, e2e tests, benchma

Jan 5, 2023

A scanner for running security-related configuration checks such as CIS benchmarks

Localtoast Localtoast is a scanner for running security-related configuration checks such as CIS benchmarks in an easily configurable manner. The scan

Dec 15, 2022

Benchmarks to compare Go Generics

This is a collection of various sorts implemnted both as []int only and as const

Dec 8, 2022

Sqlbench runs benchmarks on an SQL database

sqlbench runs benchmarks on an SQL database. Right now this works for PostgreSQL

Oct 13, 2022

Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers.

Cloud-Z Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers. Cloud type, instance id, and type CPU infor

Jun 8, 2022

An operator that helps you perform benchmarks

Camunda-Benchmark-Operator 🏋️‍♀️ An operator that helps you perform benchmarks. Your first benchmark This requires that you know how to run the opera

Mar 2, 2022

Advanced benchmarks for +15 Go ORMs.

Go ORM Benchmarks Advanced benchmarks for +10 Go ORMs. Originally forked from orm-benchmark. ORMs All package run in no-cache mode. beego/orm bun gorm

Dec 11, 2022

A C/S Tool to Download Torrent Remotely and Retrieve Files Back Over HTTP at Full Speed without ISP Torrent Limitation.

remote-torrent Download Torrent Remotely and Retrieve Files Over HTTP at Full Speed without ISP Torrent Limitation. This repository is an extension to

Sep 30, 2022

Efficient moving window for high-speed data processing.

Moving Window Data Structure Copyright (c) 2012. Jake Brukhman. ([email protected]). All rights reserved. See the LICENSE file for BSD-style license. I

Sep 4, 2022

darkroom - An image proxy with changeable storage backends and image processing engines with focus on speed and resiliency.

darkroom - An image proxy with changeable storage backends and image processing engines with focus on speed and resiliency.

Darkroom - Yet Another Image Proxy Introduction Darkroom combines the storage backend and the image processor and acts as an Image Proxy on your image

Dec 6, 2022

Simulate network link speed

linkio linkio provides an io.Reader and io.Writer that simulate a network connection of a certain speed, e.g. to simulate a mobile connection. Quick s

Sep 27, 2022

Fast, powerful, yet easy to use template engine for Go. Optimized for speed, zero memory allocations in hot paths. Up to 20x faster than html/template

quicktemplate A fast, powerful, yet easy to use template engine for Go. Inspired by the Mako templates philosophy. Features Extremely fast. Templates

Dec 26, 2022
Comments
  • OOM

    OOM

    I encountered a out of memory error when running the full benchmark. Obviously not your fault, but just wanted to give you a heads up.

    It seems the memory overhead for creating a mere 500 000 go routines required more than my 4GB. I added another 1GB of swap just to test and it still crashed with an OOM.

    The issue is reproducible on my machine by running the benchmarks with

    $ go test -v -test.bench=".*"
    

    which would throw out the following when hitting the BaselineGo benchmark.

    throw: out of memory (FixAlloc)
    
    goroutine 1 [chan receive]:
    testing.(*B).run(0xf8400730a0, 0x9732500000003, 0x7ff66dc53e10, 0x100000001)
        /home/simon/lib/golang/src/pkg/testing/benchmark.go:133 +0x49
    testing.RunBenchmarks(0x400c00, 0x571850, 0x6700000067, 0x0)
        /home/simon/lib/golang/src/pkg/testing/benchmark.go:244 +0x4c1
    testing.Main(0x400c00, 0x56c528, 0x100000001, 0x571850, 0x6700000067, ...)
        /home/simon/lib/golang/src/pkg/testing/testing.go:293 +0x180
    main.main()
        /tmp/go-build113068524/github.com/feyeleanor/gospeed/_test/_testmain.go:249 +0x91
    
    goroutine 2 [syscall]:
    created by runtime.main
        /home/simon/lib/golang/src/pkg/runtime/proc.c:221
    
    goroutine 54 [running]:
    github.com/feyeleanor/gospeed.BenchmarkBaselineGo(0xf8400730a0, 0x41f661)
        /home/simon/src/github.com/feyeleanor/gospeed/baseline_benchmark_test.go:282 +0x37
    testing.(*B).runN(0xf8400730a0, 0xf4240, 0x2710000f4240, 0xbabf2000babf2)
        /home/simon/lib/golang/src/pkg/testing/benchmark.go:84 +0x4e
    testing.(*B).launch(0xf8400730a0, 0x0)
        /home/simon/lib/golang/src/pkg/testing/benchmark.go:169 +0x147
    created by testing.(*B).run
        /home/simon/lib/golang/src/pkg/testing/benchmark.go:132 +0x2c
    

    Simply running

    $ go test -v -test.bench="BaselineGo"
    

    would not reproduce the error, but still consume a lot of memory.

    P.S. Thanks for the nice benchmarks. Really helps when you'd like to know how the basic constructs of the language perform.

Related tags
Benchmarks of Go serialization methods

Benchmarks of Go serialization methods This is a test suite for benchmarking various Go serialization methods. Tested serialization methods encoding/g

Jan 1, 2023
benchmarks for implementation of servers which support 1 million connections

Benchmark for implementation of servers that support 1m connections inspired by handling 1M websockets connections in Go Servers 1_simple_tcp_server:

Jan 5, 2023
Compare various Image resize algorithms for the Go language

speedtest-resize Compare various Image resize algorithms for the Go language I am writing a web gallery called gonagall in Go (https://github.com/fawi

Dec 8, 2022
An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.

ozzo-validation Description ozzo-validation is a Go package that provides configurable and extensible data validation capabilities. It has the followi

Jan 7, 2023
Sample full stack micro services application built using the go-Micro framework.
Sample full stack micro services application built using the go-Micro framework.

goTemp goTemp is a full stack Golang microservices sample application built using go-micro. The application is built as a series of services that prov

Dec 26, 2022
crud is a cobra based CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service documentation and k8s deployment manifests

crud crud is a CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service docum

Nov 29, 2021
Benchmarks of common basic operations for the Go language.

gocostmodel This package was inspired by Brian W. Kernighan and Rob Pike's book "The Practice of Programming" (Addison-Wesley, 1999). In Chapter 7 on

Dec 23, 2022
Go package for calculating the sunrise and sunset times for a given location

go-sunrise Go package for calculating the sunrise and sunset times for a given location based on this method. Usage To calculate sunrise and sunset ti

Dec 13, 2022
Golang metrics for calculating string similarity and other string utility functions

strutil strutil provides string metrics for calculating string similarity as well as other string utility functions. Full documentation can be found a

Jan 3, 2023
A Go library for calculating the sunset/sunrise time from a given location.

solar A library for calculating the sunset/sunrise time from a given location, as well as a function to calculate the whitepoint. It is a port of ~ken

Nov 28, 2021