mozilla/rust — pull request #6182 by huonw (2013-05-02 09:48:26+00:00)
Title: String routine optimisations

This adds #[inline] to many very common string routines (e.g. `len`).

It also rewrites `repeat` to not use `+=` and make it O(n) rather than O(n^2), and also concat/connect(_slices) to reduce the overhead of reallocations and constantly `set_len`ing in `push_str`. (The added complexity might not be worth the 20% speedup though.)