[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[VSE,speed] execution speed

A script of long loop is used to check slow speed of execution of basic scripts.

" Basic script - long loop"
    | code |
    code := 'x = 0
FOR i = 1 TO 10000
x = x + 1
NEXT
RETURN x'.
    ^self print: 'Long loop took='
        ,[ Interpreter execute: code ] ms 
        ,#ms

Time spent on execution of long loop script

EnvironmentdeviceO.S.
time (ms)
multiple runs (seconds)
coco8 iPad 3.5 iOS 9.3.1 101000 101s to 108s
chrome iPad 3.5 iOS 9.3.1 107600 107s to 124s
safari iPad 3.5 iOS 9.3.1 107800 107s
coco8 iPhone 6s iOS 9.3.1 _60000 60s to 77s
chrome iPhone 6s iOS 9.3.1 _54500 54s
safari iPhone 6s iOS 9.3.1 _65500 65s
chrome sony xperia android 5.1_34300 34s
chrome Samsung Tab Aandroid 5.0_35600 35s
safari mac (desktop)osx 10.11 _29740 29s to 42s
MS Edgepc (desktop)win 10 _18700 18s to 19s
chrome mac (desktop)osx 10.11 __3700 3s to 4s
chrome pc (desktop)win 10 __5900 6s

The same image was used to run the test in multiple execution environments.
As the script use pure smalltalk to run, the comparative of execution times reveal the differences of the VM performance (and hardware) in each case.

Numbers show:

Traces of execution

The slow execution speed in mobile platforms do not mean we canīt do better on s8 side. So I started an analysis of methods activated by the framework to see if we can make it run faster, modifying low level methods used by the framework.

To create a QR code image in this swiki pointing to a page, add an <IMG src="theURL"> HTML element in the page where "theURL" is the result of evaluating the following expression in a workspace
UI8Workspace new
	qrFor: 'SwikiCodeRobot @> 210'
	width: 300 height: 300