Perf improvement by replacing sub by lay
Fix test-api/RegExpStringModification failure on 64-bit native