Skip to content

Commit

Permalink
Add PRTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderingfairy committed Jun 28, 2021
1 parent 844260e commit adfa765
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
I changed to use ContiguousArray< UIViewController > type to store UIViewControllers in a contiguous block of memory.

When using a large number of UIViewControllers as tabs, I think that using ContiguousArray will yield more predictable performance compared to Array.



The changed files are:

- Sources/PagerTabStripViewController.swift

for Example:

- BarExampleViewController.swift
- ButtonBarExampleViewController.swift
- InstagramExampleViewController.swift
- NavButtonBarExampleViewController.swift
- SegmentedExampleViewController.swift
- SpotifyExampleViewController.swift
- TwitterExampleViewController.swift
- YoutubeExampleViewController.swift
- YoutubeWithLabelExampleViewController.swift



References

- https://github.com/apple/swift/blob/main/docs/Arrays.rst

- https://developer.apple.com/documentation/swift/contiguousarray

- https://github.com/apple/swift/blob/main/docs/OptimizationTips.rst#advice-use-contiguousarray-with-reference-types-when-nsarray-bridging-is-unnecessary

- http://jordansmith.io/on-performant-arrays-in-swift/
- https://medium.com/@nitingeorge_39047/swift-array-vs-contiguousarray-a6153098a5

0 comments on commit adfa765

Please sign in to comment.