Skip to content

Instantly share code, notes, and snippets.

@almostintuitive
Created November 28, 2015 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almostintuitive/0534e7e8329a7f9b3ca0 to your computer and use it in GitHub Desktop.
Save almostintuitive/0534e7e8329a7f9b3ca0 to your computer and use it in GitHub Desktop.
Imperative vs. FRP swift performance
func test1Imperative() {
class Counter {
var count: Int = 0 {
didSet {
realCount = count+1
}
}
var realCount: Int = 0
}
var counter = Counter()
for i in 1..<100000 {
counter.count = i
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment