Some Sample Performance Numbers

Some Sample Performance Numbers

To illustrate some of our ideas, here is a table listing the approximate run times for a few basic actions. Note that these values should NOT be taken as absolute numbers: they are a combination of CPU and wall clock time, and will change as improvements are made to the system. However, it is worth noting how these values apply relative to each other — for example, adding a member variable currently takes about four times as long as adding a local variable.
Add a local variable1
Add a member variable4
Call String.length()5
Call empty static native method5
Call empty static method12
Call empty virtual method12.5
Call empty interface method15
Call Iterator:next() on a HashMap165
Call put() on a HashMap600
Inflate 1 View from XML22,000
Inflate 1 LinearLayout containing 1 TextView25,000
Inflate 1 LinearLayout containing 6 View objects100,000
Inflate 1 LinearLayout containing 6 TextView objects135,000
Launch an empty activity3,000,000


Popular posts from this blog

Android Objective type Question and Answers

Android Questions and Answers for written exams

Android Interview questions