Skip to content

swift2geek/swift-extensions-performance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Benchmark of Swift 4 extensions compilation times

This benchmark compares compilation time of class with N method vs. time to compile class and N single-method extensions in Swift.

Usage

rake benchmark

Results

On my machine (Macbook Pro 15'' 2017) it produces the following results:

Benchmark results

n methods extensions
100 0,55 0,3133
1000 2,07 2,1967
2000 4,1533 4,46
3000 6,2867 6,9467
5000 10,7267 12,71
10000 23,64 38,2133

About

Benchmark of compilation time of extensions VS methods in Swift 4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%