-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ASDisplayNode] Implement a std::atomic-based flag system for superb …
…performance Although Objective-C atomics are equally fast, or better that std::atomic when access through method calls, for the most intense use cases it is best to avoid method calls entirely. In ASDisplayNode, we could benefit significantly from avoiding both method calls (already true today) but also avoid locking the mutex, for both CPU and contention gains. There will still be many methods that need locking for transactional consistency - however, there are currently dozens of accessor methods that could avoid frequent lock / unlock cycles with use of atomics, and other usages of the ivars directly where locking could be delayed until after early-return conditions are checked and passed.
- Loading branch information
Showing
3 changed files
with
34 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters