Skip to content

Instantly share code, notes, and snippets.

@atdt
Created May 31, 2012 18:55
Show Gist options
  • Select an option

  • Save atdt/2845407 to your computer and use it in GitHub Desktop.

Select an option

Save atdt/2845407 to your computer and use it in GitHub Desktop.
hashing test.js
function iter( iters ) {
values = mw.config.values;
iters = iters || 100000;
var hits = 0;
for ( var i = 0; i < iters; i++ ) {
values['wgArticleId'] = i + '';
if (isEligible()) {
hits++;
}
}
return ( hits / iters );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment