mozilla/pdf.js — pull request #5078 by nnethercote (2014-07-24 13:51:03+00:00)
Title: Optimize Ref_toString().

I have a large PDF where this function is called 1.6 million times
during loading. Minimizing the string concatenations reduces the
cumulative allocations done by Firefox within this function from 113 MB
to 48 MB.