golang

Comparing Performance of Ruby and Golang With a Benchmark

2 minute read Published:

I recently solved a coding challenge using Ruby. I’ve been curious for some time about coding using Golang, and so I decided to port it over, and see what the performance difference was. I made a small adaption for a better comparison. I’m now using a grid that has 100_000_000 squares on it. This is definitely a bit of work. The code package main import ( "encoding/json" "fmt" "io/ioutil" "os" ) var grid [][]int var gridDim [2]int var a = make(map[[2]int]bool) func main() { jsonFile, err := ioutil.