hapiel / Acrobot

The Acrobot is a robotic circus performer made by Daniel Simu
http://acrobot.nl/
5 stars 0 forks source link

benchmark functions #30

Closed hapiel closed 10 months ago

hapiel commented 10 months ago

Some things are slow. From a test just now it seems that a loop takes 22 - 115ms, which is a lot?

so benchmark all the updates and see which are the bottlenecks, and see if there are fixes for it.

In the worst case we have to do multithreading maybe, and put slow stuff on another thread?

Also I like to use map() but I just noticed it takes about 1-4ms? That seems unreasonably slow, no? -INCORRECT, it included a joystick call too.

TODO:

hapiel commented 10 months ago

Good to know: Printing a debug message takes 500-700 microseconds.

hapiel commented 10 months ago

It seems like drawing the menu takes about 40ms. that's super long. I think I need to look into multi-threading as that's an easy-ish fix.

hapiel commented 10 months ago

Closing this for now, multithreading solves all immediate issues.