Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Latest commit

 

History

History
26 lines (14 loc) · 1.04 KB

benchmarks.md

File metadata and controls

26 lines (14 loc) · 1.04 KB

Benchmarks

This page contains benchmark results for LayoutKit, Auto Layout, and manual layout code.

LayoutKit is as fast as manual layout code and significantly faster than Auto Layout.

Methodology

Benchmarks were run on an iPhone 6 running iOS 9.3.2 with Swift optimization turned on.

UICollectionView

UICollectionView benchmark

Notes:

  • estimatedItemSize is hard to use so these tests use sizeForItemAtIndexPath.
  • UICollectionViewFlowLayout requests the height of all cells during layout (even those that are off screen). This is why layout performance keeps getting worse as number of cells are added to the UICollectionView.

UITableView

UITableView benchmark

Notes:

  • Unlike UICollectionView, UITableView defers asking for the height of cells until it is needed. This is why performance is constant for seven or more cells.