Closed epmatsw closed 11 years ago
Removed unnecessary split from character count, switched paragraph and word counts to use match rather than replace+split.
As far as I can tell, this code should produce the same results in about half of the time.
Benchmarks: http://jsperf.com/wds1/6
Thanks a lot for pointing it out, didn't know about that. :)
Removed unnecessary split from character count, switched paragraph and word counts to use match rather than replace+split.
As far as I can tell, this code should produce the same results in about half of the time.
Benchmarks: http://jsperf.com/wds1/6