-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
partition sparse switches into packed segments
Summary: This change is motivated by agampe's analysis and idea to do more fine-trained splitting when beneficial. This generalizes the splitting of switches: ``` 1. Splitting sparse switches into packed segments and remaining sparse switches. We only do this if we can find a partitioning of a sparse switch of size N into M packed segments and a remaining sparse switch of size L such that M + log2(L) <= log2(N). This transformation is largely size neutral. Before the transformation, the interpreter would have O(log2(N)) and compiled code O(N). After the tranformation, the interpreter gets down to O(M + log2(L)) and compiled code to O(M + L). So while the runtime performance of the interpreter won't change much, compiled code will run must faster; if L gets close to 0, we get O(M) <= O(log2(N)). ``` Reviewed By: agampe Differential Revision: D68985937 fbshipit-source-id: 72d67aef0172749a4a259b527c163e5acc9dd7c5
- Loading branch information
1 parent
b228b1b
commit c203380
Showing
3 changed files
with
334 additions
and
88 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
Oops, something went wrong.