counting lines by splitting by, replacing, or looking for line breaks (version: 1)
Compares splitting a string and counting the array items to replacing line breaks with an empty string and computing the difference from the original length.
Comparing performance of: split vs replace vs look
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory