-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ref passing, but keep devirtualizations
- Loading branch information
1 parent
3223bdc
commit ec77f1d
Showing
48 changed files
with
408 additions
and
784 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,10 @@ | ||
namespace Craftimizer.Simulator.Actions; | ||
|
||
internal sealed class AdvancedTouch : BaseAction | ||
internal sealed class AdvancedTouch() : BaseAction( | ||
ActionCategory.Quality, level: 84, actionId: 100411, | ||
increasesQuality: true, | ||
defaultCPCost: 46, defaultEfficiency: 150) | ||
{ | ||
public int CostDefault = 46; | ||
public int CostOptimal = 18; | ||
public int EfficiencyDefault = 150; | ||
|
||
public AdvancedTouch() | ||
{ | ||
Category = ActionCategory.Quality; | ||
Level = 84; | ||
ActionId = 100411; | ||
IncreasesQuality = true; | ||
} | ||
|
||
|
||
public override void CPCost(Simulator s, ref int cost) | ||
{ | ||
cost = s.ActionStates.TouchComboIdx == 2 ? CostOptimal : CostDefault; | ||
} | ||
|
||
public override void Efficiency(Simulator s, ref int eff) | ||
{ | ||
eff = EfficiencyDefault; | ||
} | ||
public override int CPCost(Simulator s) => | ||
s.ActionStates.TouchComboIdx == 2 ? 18 : 46; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
namespace Craftimizer.Simulator.Actions; | ||
|
||
internal sealed class AdvancedTouchCombo : BaseComboAction<StandardTouchCombo, AdvancedTouch> | ||
internal sealed class AdvancedTouchCombo() : BaseComboAction<StandardTouchCombo, AdvancedTouch>( | ||
ActionType.StandardTouchCombo, ActionType.AdvancedTouch, 18 * 3 | ||
) | ||
{ | ||
public override ActionType ActionTypeA => ActionType.StandardTouchCombo; | ||
public override ActionType ActionTypeB => ActionType.AdvancedTouch; | ||
|
||
} |
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
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.
ec77f1d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Craftimizer.Benchmark.Bench.Solve(State: 136BC376, Config: 89DD5AF7)
85193827.77777778
ns (± 862271.7969021155
)Craftimizer.Benchmark.Bench.Solve(State: 136BC376, Config: 89DD5AF7)
66711051.666666664
ns (± 839975.2011760669
)Craftimizer.Benchmark.Bench.Solve(State: 34AFBBA1, Config: 89DD5AF7)
124861286.66666667
ns (± 1204626.615604939
)Craftimizer.Benchmark.Bench.Solve(State: 34AFBBA1, Config: 89DD5AF7)
96176391.11111112
ns (± 709819.2961655739
)This comment was automatically generated by workflow using github-action-benchmark.