Skip to content

Instantly share code, notes, and snippets.

@jeroneemou
Created April 3, 2020 14:44
Show Gist options
  • Save jeroneemou/af538f1c53b423f1f0aa2fd17e75bc09 to your computer and use it in GitHub Desktop.
Save jeroneemou/af538f1c53b423f1f0aa2fd17e75bc09 to your computer and use it in GitHub Desktop.
Testing performance
const getPerfs = () => {
let array = []
const start = (window.performance || Date).now()
for (let i = 0; i < 20000; i++) {
array = Math.pow(Math.sin(Math.random()), 2)
}
const end = (window.performance || Date).now()
return end - start
}
if (timing < 7) PERF = PERF_HIGH
@jeroneemou
Copy link
Author

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