Optimize ContinuationQueue and PlayerLoopRunner iteration
- Fix failing to eliminate array bounds check in PlayerLoopRunner.RunCore - Reduce number of array bounds check of continuation iteration in ContinuationQueue.RunCoremaster
parent
a65f4da7a2
commit
ea950d8cec
|
@ -170,8 +170,8 @@ namespace Cysharp.Threading.Tasks.Internal
|
|||
|
||||
for (int i = 0; i < actionListCount; i++)
|
||||
{
|
||||
var action = actionList[i];
|
||||
actionList[i] = null;
|
||||
|
||||
ref var action = ref actionList[i];//Reduce array bounds check
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -181,6 +181,7 @@ namespace Cysharp.Threading.Tasks.Internal
|
|||
{
|
||||
UnityEngine.Debug.LogException(ex);
|
||||
}
|
||||
action = null;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -143,6 +143,7 @@ namespace Cysharp.Threading.Tasks.Internal
|
|||
{
|
||||
var j = tail - 1;
|
||||
|
||||
var loopItems = this.loopItems;
|
||||
// eliminate array-bound check for i
|
||||
for (int i = 0; i < loopItems.Length; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue