How BigCache avoids expensive GC cycles and speeds up concurrent access in Go

A few days ago, I read an article about BigCache and I was interested to know how they avoided these 2 problems: concurrent access expensive GC cycles I went to their repository and read the code to understand how they achieved it. I think it’s amazing so I would like to share it with you. ‘Fast, concurrent, evicting in-memory cache written to keep big number of entries without impact on performance....

October 29, 2019 · 6 min · Me

Implementation of Dijkstra using heap in Go

Simple implementation of Dijkstra using heap in Go. What is Dijkstra? MEGA SHORT DESCRIPTION: Dijkstra’s algorithm to find the shortest path between a and b. It picks the unvisited node with the lowest distance, calculates the distance through it to each unvisited neighbor, and updates the neighbor’s distance if smaller. Mark all nodes unvisited. Create a set of all the unvisited nodes called the unvisited set, in our case we are going to use a set for visited nodes, not for unvisited nodes....

July 21, 2019 · 6 min · Me