Menu

Parcelable or Serializable

We all know we cannot just pass object references to activities or fragments, we must put those in an Intent / Bundle. We only have two options, with Parcelable or Serializable. How about the performance / speed?

Here the results:

Nexus 10
Serializable: 1.0004ms, Parcelable: 0.0850ms – 10.16x improvement.

Nexus 4
Serializable: 1.8539ms – Parcelable: 0.1824ms – 11.80x improvement.

Desire Z
Serializable: 5.1224ms – Parcelable: 0.2938ms – 17.36x improvement.

Source By : http://www.developerphil.com/parcelable-vs-serializable/

Thanks to Philippe Breault.

And here the Source to download

Comments (0)

Leave a comment

Your email address will not be published. Required fields are marked *