Skip to content

RegExp: String replace operations using Regular Expressions are slow in EDGE and IE9+ for large strings #1733

@manishbarman

Description

@manishbarman

RegEx evaluator in Chakra Core seems to perform slowly (takes more than double the time) for large strings compared to Chrome.

Standalone test case to reproduce the issue
http://jsfiddle.net/Lwa0t5rp/3/

Sample test output extract
Chrome: v53.0.2785
regex 1: 2.8100000000000214 regex 2: 1.3566666666666833 ( rows : 4096 string length:2569724)
regex 1: 3.7816666666666756 regex 2: 2.7783333333333453 ( rows : 8192 string length:5146108)
regex 1: 7.228333333333315 regex 2: 6.0666666666666815 ( rows : 16384 string length:10337180)
regex 1: 14.333333333333334 regex 2: 11.303333333333436 ( rows : 32768 string length:20741020)
regex 1: 27.843333333333362 regex 2: 29.471666666666692 ( rows : 65536 string length:41548700)

EDGE: v38.14393.0.0 EdgeHTML 14.14393
regex 1: 5.059881559322018 regex 2: 2.975162459528974 ( rows : 4096 string length:2205180)
regex 1: 9.785139583279791 regex 2: 6.15836259479958 ( rows : 8192 string length:4417020)
regex 1: 19.578437506784894 regex 2: 11.69511229889531 ( rows : 16384 string length:8879004)
regex 1: 44.75823350880349 regex 2: 25.138609542494805 ( rows : 32768 string length:17824668)
regex 1: 78.02833970539177 regex 2: 47.913274211683984 ( rows : 65536 string length:35715996)

IE11 performance is far worse
IE11: v11.187.14393.0
regex 1: 17886.814111784788 regex 2: 5.659022724537256 ( rows : 4096 string length:2205180)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions