Speed ​​up the repeat expansion of large string.