Skip to content

Instantly share code, notes, and snippets.

@DavidBruant
Created August 23, 2013 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidBruant/6316619 to your computer and use it in GitHub Desktop.
Save DavidBruant/6316619 to your computer and use it in GitHub Desktop.
10 out of 10000
(function(){
var a = [];
for(var i = 0 ; i < 10000 ; i++){
a.push({
entryType : Math.random() < 0.001 ? 'resource' : 'mark',
name: 'yo',
startTime : performance.now(),
duration: 0
})
}
console.time('10000')
var res = a.filter(function(e){ return e.entryType === 'resource' });
console.timeEnd('10000')
console.log('res.length', res.length)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment