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

mathiasbynens / esrever / 46
81%

Build:
DEFAULT BRANCH: master
Ran 12 Feb 2018 12:56PM UTC
Jobs 3
Files 1
Run time 16s
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

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

Jobs
ID Job ID Ran Files Coverage
1 46.1 12 Feb 2018 12:56PM UTC 0
80.77
Travis Job 46.1
2 46.2 12 Feb 2018 12:56PM UTC 0
80.77
Travis Job 46.2
3 46.3 12 Feb 2018 12:56PM UTC 0
80.77
Travis Job 46.3
Source Files on build 46
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #46
  • 14b34013 on github
  • Prev Build on master (#45)
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