# Optimising Stripped Locks using Golang arrays

DevFeed: [Optimising Stripped Locks using Golang arrays](<https://devfeed.tech/articles/optimising-stripped-locks-using-golang-arrays-39628.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2024-08-14_Optimising-Stripped-Locks-using-Golang-arrays-34b45ef4e975>)

Published: 2024-08-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Gaurav Sarma's Blog](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [hashing](<https://devfeed.tech/topics/hashing.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [golang](<https://devfeed.tech/tags/golang.md>)

## AI overview

This tutorial explains replacing a global datastore lock with striped locks mapped to buckets by hashing keys. It outlines the bucket and locking approach and begins a benchmark comparing Go maps and arrays for key-fetch performance at different sizes.

## Source excerpt

. [Optimising Striped Locks with Go Arrays](optimising-stripped-locks-using-golang-arrays-cover...