Skip to content

Instantly share code, notes, and snippets.

@af
Created December 10, 2014 06:01
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 af/15e6e605e5036059ba7b to your computer and use it in GitHub Desktop.
Save af/15e6e605e5036059ba7b to your computer and use it in GitHub Desktop.
var React = require('react')
var d = require('./index')(React)
// Simple benchmark for testing the effectiveness of memoization for JSnoX
// Usage: "time node bench.js", with and without the patch in question.
for (var i=0; i<10000; i++) {
d('input:email.test.test2')
d('div.foo')
d('section.foo', { className: 'baz', id: 'asdf' })
}
console.log('done')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment