Repository navigation
Use | more judiciously - #2028
Merged
Merged
Conversation
MichaelChirico
marked this pull request as draft
August 1, 2023 08:06
Codecov Report
@@ Coverage Diff @@
## main #2028 +/- ##
=======================================
Coverage 98.55% 98.55%
=======================================
Files 113 113
Lines 4994 4995 +1
=======================================
+ Hits 4922 4923 +1
Misses 72 72
|
AshesITR
reviewed
Aug 1, 2023
AshesITR
reviewed
Aug 1, 2023
Collaborator
Author
|
Very little (if any) improvement on exp <- get_source_expressions("QC.R")
l <- redundant_equals_linter()
# AT HEAD
system.time(replicate(500, lapply(exp$expressions, l)))
# user system elapsed
# 35.225 0.172 35.577
# AT ae0551b
system.time(replicate(500, lapply(exp$expressions, l)))
# user system elapsed
# 35.147 0.120 35.392 Checking on |
AshesITR
reviewed
Aug 1, 2023
Collaborator
Author
|
Oh interesting, # HEAD
system.time(replicate(500, lapply(exp$expressions, l)))
# user system elapsed
# 171.315 0.280 172.313
# d4e93e1
system.time(replicate(500, lapply(exp$expressions, l)))
# user system elapsed
# 83.125 0.118 83.554 |
MichaelChirico
marked this pull request as ready for review
August 2, 2023 07:09
AshesITR
reviewed
Aug 2, 2023
Collaborator
Author
|
Lint will go away after merging #2033 |
AshesITR
approved these changes
Aug 2, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-examined in what situations
|can be used.Till now we've often conservatively used
//NODE1[ $BIG_EXPRESSION ] | //NODE2[ $BIG_EXPRESSION ], but this works fine:(//NODE1 | //NODE2)[ $BIG_EXPRESSION ].Untested as yet but I am assuming this can have some efficiency benefit (or at least not hurt, while hopefully making the code more readable).
Marking as draft for now since
infix_spaces_linter()will likely benefit and #2025 is pending, but feel free to review the existing changes. I'll also try and add some timings.