optimization - Best practices to compile an iPhone app optimizing it for maximum speed? -
i wondering people doing in order compile iphone applications optimizing them maximum speed rather size or tradeoff speed versus size.
you should always, always profile code before making blanket assumptions or bad particular app. shark nice , able use hardware performance counters on device tell lots of low-level details how application running.
on iphone 3gs, compiling thumb-2 doesn't incur performance penalty older thumb instruction set (it has native floating point, in particular). see this other question additional details.
you can produce binaries more 1 instruction set in them, though i'm not sure if can "no thumb" arm6 (pre-iphone 3gs) , "thumb ok" arm7 (iphone 3gs, presumably ipad, don't know ipod touches). edit: possible, brad explaining how.
in many cases, optimizing size way optimize speed: squeezing code size, may fit better cpu's instruction cache, avoiding fetches memory. helps more executed tight loops.
Comments
Post a Comment