Skip to content

Instantly share code, notes, and snippets.

@HaradaKumiko
Last active February 21, 2022 15:34
Show Gist options
  • Save HaradaKumiko/b2274c505fade9b46ac07df382e6bf4d to your computer and use it in GitHub Desktop.
Save HaradaKumiko/b2274c505fade9b46ac07df382e6bf4d to your computer and use it in GitHub Desktop.
const smallArray = [5, 3, 2, 35, 2];
const bigArray = [5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2];
const start = performance.now()
bigArray.push(10)
const end = performance.now()
console.log(`Time : ${end-start}`)
@HaradaKumiko
Copy link
Author

HaradaKumiko commented Feb 21, 2022

Kurang dari 1 milisecond
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment