When counting from 1 to 20,000 using a variable, the time it takes:
1.If run in ai2 companion, it's around 8 times difference
2.But if run in apk, it's more than 20 times!!! See below↓
variable_test.aia (2.9 KB)
That is, if my app contains a large quantity of caculating, i should aways copy the global variable to a local one, after caculating, then return the result to the global varieble
3 Likes
TIMAI2
April 13, 2023, 12:33pm
2
Interesting, my tests, using your example, global took @ 10x as long (700ms vs 7000ms)
1 Like
yes the difference in efficiency is huge. wow
ABG
April 14, 2023, 12:58am
4
When it comes to speed, locality rules.
This applies from the chip level to the server level.
1 Like
When it comes to speed, Assembly rules.
2 Likes
ABG
April 14, 2023, 3:09am
6
Cash is King - Investopedia
Cache is king - Intel
3 Likes