O'Reilly logo

Pro Android Apps Performance Optimization by Hervé Guihot

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data Structures

As the various Fibonacci implementations demonstrated, good algorithms and good data structures are keys to a fast application. Android and Java define many data structures you should have good knowledge of to be able to quickly select the right ones for the right job. Consider choosing the appropriate data structures one of your highest priorities.

The most common data structures from the java.util package are shown in Figure 1.1.

To those data structures Android adds a few of its own, usually to solve or improve performance of common problems.

  • LruCache
  • SparseArray
  • SparseBooleanArray
  • SparseIntArray
  • Pair

NOTE: Java also defines the Arrays and Collections classes. These two classes contain only static methods, which operate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required