Skip to content

Instantly share code, notes, and snippets.

@caryfuk
Last active September 12, 2018 08:22
Show Gist options
  • Save caryfuk/3094dbc52965d594a9cd861184002429 to your computer and use it in GitHub Desktop.
Save caryfuk/3094dbc52965d594a9cd861184002429 to your computer and use it in GitHub Desktop.
circular list
const list = new Array(100)
function set (i, item) {
list[i % list.length] = item
}
// and something on performance: https://www.nearform.com/blog/wormholes-in-javascript/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment