Add benchmark to test.js.
Fix updating with short inputs.

Add test.

Closes #2.