• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mathiasbynens / esrever
81%

Build:
DEFAULT BRANCH: master
Repo Added 04 Dec 2013 01:31PM UTC
Files 1
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • master
  • v0.2.0

pending completion
46

push

travis-ci

mathiasbynens
Build up result in array instead of strings

Incrementally concatenating strings means a lot of intermediate strings get allocated only to be thrown away. The result is O(n**2) in both space and time. See this post about “Shlemiel the painter’s algorithm” for a good description about the quadratic behavior involved: https://www.joelonsoftware.com/2001/12/11/back-to-basics/

Storing each fragment in an array and joining them all together in the end at least avoids allocating ever-longer intermediate strings. I have not run any benchmarks on very long strings,
though. That might still be interesting to do.

Closes #12.

16 of 25 branches covered (64.0%)

21 of 26 relevant lines covered (80.77%)

97.15 hits per line

Relevant lines Covered
Build:
Build:
26 RELEVANT LINES 21 COVERED LINES
97.15 HITS PER LINE
Source Files on master
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
46 master Build up result in array instead of strings Incrementally concatenating strings means a lot of intermediate strings get allocated only to be thrown away. The result is O(n**2) in both space and time. See this post about “Shlemiel the painter’s al... push 12 Feb 2018 12:56PM UTC mathiasbynens travis-ci pending completion  
45 master Update dependencies push 12 Feb 2018 10:28AM UTC mathiasbynens travis-ci pending completion  
44 master Build up result in array instead of strings Incrementally concatenating strings means a lot of intermediate strings get allocated only to be thrown away. The result is O(n**2) in both space and time. See this post about Shlemiel the painter's al... Pull #12 30 Mar 2017 09:30AM UTC web-flow travis-ci pending completion  
43 master Build up result in array instead of strings Incrementally concatenating strings means a lot of intermediate strings get allocated only to be thrown away. The result is O(n**2) in both space and time. See this post about Shlemiel the painter's al... Pull #12 30 Mar 2017 09:30AM UTC web-flow travis-ci pending completion  
42 master Use `Array#find` in build scripts This requires a build environment with Node.js v4+. push 15 Sep 2015 08:49AM UTC mathiasbynens travis-ci pending completion  
41 master Use Unicode v8.0.0 data push 18 Jun 2015 09:09AM UTC mathiasbynens travis-ci pending completion  
40 master Test in Node.js v0.12, io.js, and Rhino 1.7R5 push 25 Feb 2015 12:02AM UTC mathiasbynens travis-ci pending completion  
39 v0.2.0 Release v0.2.0 push 26 Jan 2015 08:19AM UTC mathiasbynens travis-ci pending completion  
39 master Release v0.2.0 push 26 Jan 2015 08:18AM UTC mathiasbynens travis-ci pending completion  
38 master Update dependencies push 26 Jan 2015 08:16AM UTC mathiasbynens travis-ci pending completion  
See All Builds (14)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc