Execution & time consumption

edited May 2016 in Programming Questions

Hi All,

I've experienced slow-downs while executing a sketch which draws figures using line(). Things I've done to improve speed are:

  • use P2D,
  • disable smooth with noSmooth(),
  • give up use of vectors,
  • give up use of arrays,
  • give up use of fill() (stroke-only figures).

I've found this table which shows a hierarchy of different operations' time consumption:

Can it be trusted?

On the same subject:

  • Do matrix transformations (pushMatrix() & popMatrix())slow things down if used every loop?
  • Would I improve timing if i used the shape() method to draw figures instead of invoking line() for every side of my shapes?
Tagged:
Sign In or Register to comment.