GvR's idea to use memset() for the most common special case of repeating a single character.  Shaves another 10% off the running time by avoiding the lg2(N) loops and cache effects for the other cases.
GvR's idea to use memset() for the most common special case of repeating
a single character.  Shaves another 10% off the running time by avoiding
the lg2(N) loops and cache effects for the other cases.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator