The bug emerges as a fast exit (crash) in mobile devices (free memory 1Gb) after a number of iterations, or running at very slow execution speed (free memory +2Gb) |
| code | code := '1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0'. 500 timesRepeat: [:i| self print: '#' ,i ,' ' ,[ code doIt ] ms ,#ms ].
var code = "1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0"; (500).timesRepeat_(function(i){ print("#"+i+" " +(function(){code.doIt()}).ms() +"ms"); });
Built with Xcode | Version 8.2 beta (8C23) |
ObjectiveC code | Using Apple's new Objective-C to Javascript Bridge. See ViewController.m file in Xcode project (E8.zip) |
iPhone 6s - iOS 10.1.1 (14B150) | Crash (fast exit) in step #28 eval time=3500 to 6000ms |
iPad - iOS 10.2 (14C5077b) | Finished OK, eval time=3000 to 7000ms |
| code | code := '1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0'. 50 timesRepeat: [:i| self print: '#' ,i ,' ' ,[ code doIt ] ms ,#ms ].
Safari 10.0.1 (12602.2.14.0.7) | Freeze for long time, but finished, eval time=2500 to 5000ms |
Chrome 54.0.2840.98 (64-bit) | Finished OK, eval time=30 to 45ms |
iPhone 6s - iOS 10.1.1 (14B150) | Crash (Terminated due to memory issue) in step #3 eval time=4600 to 5700ms |
iPad - iOS 10.2 (14C5077b) | Finished OK, eval time=1900 to 2400ms |
iPhone 6s - iOS 10.1.1 (14B150) | Finished OK, eval time=370 to 420ms |
iPad - iOS 10.2 (14C5077b) | Finished OK, eval time=100 to 220ms |
Sony Xperia Z3 - Android 5.1.1 | Finished OK, eval time=630 to 1070ms |