paint-brush
How To Write Benchmarks In Golang Like An Expertby@tiago-melo
18,342 reads
18,342 reads

How To Write Benchmarks In Golang Like An Expert

by Tiago Melo10mMay 25th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

The Golang testing package contains a benchmarking facility that can be used to examine the performance of your Golang code. In this article we'll see how to write simple benchmark tests that are able to provide us good insights about a given algorithmic solution. The Fibonacci number calculation is a classic numerical series where each subsequent number is the sum of the previous two numbers: 1 1 2 3 5 8 13......or 1.631s versus 1.875s. We'll benchmark both recursive and sequential approaches by calculating the sequence for 10 and 20.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How To Write Benchmarks In Golang Like An Expert
Tiago Melo HackerNoon profile picture
Tiago Melo

Tiago Melo

@tiago-melo

Senior Software Engineer

About @tiago-melo
LEARN MORE ABOUT @TIAGO-MELO'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Tiago Melo HackerNoon profile picture
Tiago Melo@tiago-melo
Senior Software Engineer

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite