Skip to content

Demo project which tests the performance of dispatch_sync and objc_sync.

Notifications You must be signed in to change notification settings

plivesey/TestSwiftLockSpeeds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

TestSwiftLockSpeeds

This project tests the performance of dispatch_sync and objc_sync for making ivars in swift thread safe. It's a pretty crude test, but successfully demonstrates that objc_sync is faster in most cases.

Here are some sample results taken from an iPhone 5s (times in seconds, see the code for the test we're running):

No Resource Competition Resource Competition
dispatch_sync 0.3596130967 4.711853796
objc_sync 0.1057428122 0.2762099981
speed increase 340.08% 1705.90%

About

Demo project which tests the performance of dispatch_sync and objc_sync.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages