Conversation
18a67f3 to
7208c06
Compare
7208c06 to
12d71d3
Compare
Member
|
This gives me a ~10% speed up on the call heavy benchmarks. And (appropriately) combining this with #554 results in 30% total gain. Independently they produce 10-15% each. |
chfast
commented
Oct 1, 2020
| { | ||
| const fizzy::Value args[] = {0xa1, 0xa2}; | ||
| OperandStack stack(args, 3, 1); | ||
| OperandStack stack(args, std::size(args), 3, 1); |
Collaborator
Author
There was a problem hiding this comment.
Here is example where std::size() is better than sizeof.
chfast
commented
Oct 1, 2020
| EXPECT_THAT(execute(*instance, 0, {}), Result(0)); | ||
| EXPECT_THAT(execute(*instance, 1, {0}), Result(1)); | ||
| EXPECT_THAT(execute(*instance, 2, {0}), Result(2)); | ||
| EXPECT_THAT(execute(*instance, 1, {Value{0}}), Result(1)); |
Collaborator
Author
There was a problem hiding this comment.
When passing single 0, clang thinks it should go as nullptr. This is a workaround.
Codecov Report
@@ Coverage Diff @@
## master #552 +/- ##
=======================================
Coverage 98.24% 98.24%
=======================================
Files 62 62
Lines 9048 9052 +4
=======================================
+ Hits 8889 8893 +4
Misses 159 159 |
gumb0
reviewed
Oct 2, 2020
gumb0
reviewed
Oct 2, 2020
Collaborator
Author
|
Member
|
Looks good to me, but do you want to squash in the review comments? |
Collaborator
Author
Of course. |
The arguments list {0} causes issues in later changes due to Clang
compiler issue, https://bugs.llvm.org/show_bug.cgi?id=47704
axic
approved these changes
Oct 2, 2020
Closed
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.
Part of #526 and #563.
Pass arguments to
execute()asconst Value*, without providing information about number of arguments. Previously arguments were passed asspan<const Value>.Also "host function" may be changed accordingly in following PR.
Some parts may be committed separately: 2 first commits, the
{Value(0)}change in unit tests.