This code run 10x slower in Adobe Air:
import flash.utils.getTimer;
var str:String = "I'm a short string I'm a short string I'm a short string I'm a short string I'm a short string";
var r:RegExp = /rt|tr|m|a|n/g
var t:int = getTimer();
var result:String;
for (var i:uint = 0, n:uint = 100000; i < n; ++i)
{
result = str.replace(r, '|');
}
trace(getTimer() - t);
trace(result);
I run this code in both Flash Player and Adobe Air (Release Mode, Win 10 64-Bit, Dell Inspiron 3542), and get the result:
Flash Player: 874 ms
Adobe Air: 5461 ms
I tested this code with Animate CC and Flash Develop and get the similar result. Sometimes I get 10x slower.
I has been posted this issue here: Bug#4161031 - Regular Expression (RegExp) is 10x slower in Adobe Air
It's a strange issue. Anybody that interest please do the test and report the result here?
Thanks!