Why does Pybricks on ev3dev have slow performance compared to EV3-G? I got MINDSTORMS EV3 for my son and me. We installed Python (ev3dev) and ii seems to be running very slowly. I tried setting up the classic LEGO ev3g (block code), and that seems to run fine.
Are we doing something wrong or is Python very slow on MINDSTORMS?
Please help!
Example:
Simple program - display count and loop 100 times
Python: ~1.5s
ev3g: ~0.15s
Edit:
#!/usr/bin/env pybricks-micropython

from pybricks.hubs import EV3Brick
from pybricks.tools import wait, StopWatch
    
ev3 = EV3Brick()
ev3.speaker.beep()
timer = StopWatch()
    
for x in range(0, 100):
    ev3.screen.print(str(x) + ':' + str(timer.time()))
  
wait(5000)

This on the screen the last line displayed is
99:1113
this takes just over ~ 1.1s to loop 100 times
Printing text in pybricks-micropython on ev3dev has known performance issues, so we don't recommend doing that in a loop. The trade off is that, unlike ev3-g, you can also print in other languages that don't use Latin scripts like Chinese and Russian. Most other things should run much faster.