Thursday, June 19, 2014

Caching various values adds a further boost to speed on Android:

         335879 function calls (335346 primitive calls) in 26.201 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      102    0.031    0.000   19.809    0.194 widget.py:57(on_timer)
       66    0.016    0.000   19.713    0.299 widget.py:74(redraw)
       66    0.216    0.003   14.694    0.223 movers/__init__.py:102(run)
     1650    2.271    0.001   10.129    0.006 collisions.py:302(run)
       66    0.297    0.005    4.889    0.074 sprites.py:143(draw)
     2046    2.250    0.001    4.426    0.002 sprites.py:183(_draw_sprite)
     1650    0.439    0.000    4.348    0.003 movers/physical.py:92(run)
    73535    3.476    0.000    3.476    0.000 fixpoint.py:49(mul)
     1650    0.205    0.000    3.375    0.002 entities.py:129(add_pos)
     3464    1.184    0.000    3.097    0.001 collisions.py:115(_get_hash_area)
     1783    0.106    0.000    3.090    0.002 entities.py:73(_call_pos_listeners)
     1783    0.174    0.000    2.983    0.002 collisions.py:65(entity_pos_listener)
     1814    0.691    0.000    2.916    0.002 collisions.py:216(_update_hash)
     8772    1.055    0.000    2.245    0.000 fixpoint.py:781(is_circle_circle_collision)


Unfortunately the demo still runs far slower than on the PC. It seems that there is no way around using Cython to try to speed this up!


No comments:

Post a Comment