Android Performance Tip
Posted on:November 04 2012
When developing high performance code for android there are already a lot of tips on the web to use. One thing I learned today: Don't believe other people's suggestions on performance if you haven't tried it out yourself. One common misconception I came across multiple times for example is that it is a negligible trade-off when you use ArrayList instead of a real, Java array. For me, this wasn't true. Replacing an ArrayList with the Java array at performance critical parts of my code resulted in an overall 20% speed increase! I think one reason for this also might be that I used arrays of primitive types. When they are in the ArrayList, each type again is wrapped in a wrapper type (like 'Integer' for 'int'), probably also causing an additional impact. So yes, arrays are faster than ArrayList. Sometimes.
Comments:
Justin
Quote
2012-11-05 06:00:00
Michi
Quote
2012-11-08 19:38:00
Add comment:
Possible Codes
Feature | Code |
Link | [url] www.example.com [/url] |
Bold | [b]bold text[/b] |
Quote | [quote]quoted text[/quote] |
Code | [code]source code[/code] |
Emoticons