Compiling firmware with Linaro slightly improves performance
Posted: Tue May 13, 2014 5:11 pm
There was one thing in my mind that I wanted to do as soon as I get my pyboard and that was check if Linaro GCC increase the performance.
I used as abase the "benchmark" that is in the wiki: https://github.com/micropython/micropyt ... erformance
I put the following code in boot.py and then via serial console I ran benchmark():
With the "stock" firmware I got an avg of: 2117312
With the same version (git checkout v1.0) compiled with Linaro GCC 4.8 2014.01 I got an avg of: 2152395
That is 35083 iterations more. What do you think, It worth the difference? Anyone can suggest a proper benchmark?
I used as abase the "benchmark" that is in the wiki: https://github.com/micropython/micropyt ... erformance
I put the following code in boot.py and then via serial console I ran benchmark():
Code: Select all
def performanceTest():
millis = pyb.millis
endTime = millis() + 10000
count = 0
while millis() < endTime:
count += 1
return count
def benchmark():
c = 0
for i in range(10):
c += performanceTest()
c = c/10
print("Avg. Count: ", c)
With the same version (git checkout v1.0) compiled with Linaro GCC 4.8 2014.01 I got an avg of: 2152395
That is 35083 iterations more. What do you think, It worth the difference? Anyone can suggest a proper benchmark?