-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace if-else with switch statement
The size of the if-else statements for the 'on' argument means many logical comparisons can be avoided for values of 'on' that are far down the if-else tree. For example, 'on="secs"' required 10 comparisons. Also use match.arg() to allow users to specify 'on' with a partial name.
- Loading branch information
1 parent
bd22b03
commit d5d7c6a
Showing
1 changed file
with
58 additions
and
55 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