mozilla/rust — pull request #9885 by thestinger (2013-10-16 01:14:48+00:00)
Title: represent slices with length in elements, not bytes

The goal here is to avoid requiring a division or multiplication to compare against the length. The bounds check previously used an incorrect micro-optimization to replace the division by a multiplication, but now neither is necessary.

I wanted to to optimize the pre-optimized code too... but ran into a strange memory leak in `match_.rs`. I'll tackle that part separately.