improve speed of setValue:range: and replaceRange:length: methods.