Skip to content

Performance testing of several algorithms and data structure implementations in Swift

Notifications You must be signed in to change notification settings

alo9507/SwiftAlgoPerformanceSuite

Repository files navigation

Swift Algorithm and Data Structure Performance Suite

(Swift Docs)[https://swiftdoc.org/v3.0]

General Performance Considerations:

  1. Number of Comparisons

What is the Equatable operation being performed? Is it expensive?

  • Least expensive is comparing primitives. Lexicographic equality checking of String can get expensive depending on the length of the string
  • Comparing reference types depends on the Equatable implementaiton
  1. Is the search or sort area halved each time?

Taxonomy of Iteration Types

Ranges

Half-Open Range (..<)

Closed Range

Windowing

Closing Window - Leftward - (1..Opening Window

Sliding Window

Index Manipulation in Swift

Range Types CountableRange BidirectionalCollection .reversed()

[Adaptive Sorting Algorithm](https://en.wikipedia.org/wiki/Adaptive_sort)

About

Performance testing of several algorithms and data structure implementations in Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages