In some cases JsDiff.diffWords ate more than 500Mb RAM and I had to kill the process where it was launched

I found this in node.js environment but it also produced in browser.
Data for reproducing this bug is here: https://gist.github.com/termi/9875658