Здравствуйте, vdimas, Вы писали:
V>Здравствуйте, Sinclair, Вы писали:
V>Вариант на FindChildV, который немного подшаманил.
Тоже не лучше — много вызовов в this[int]:
BranchNode`2[[BranchNode`2[[LeafNode`1[[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]].get_Item(Int32)
L0000: push rdi
L0001: push rsi
L0002: sub rsp, 0x78
L0006: vzeroupper
L0009: vmovaps [rsp+0x60], xmm6
L000f: vmovaps [rsp+0x50], xmm7
L0015: xor eax, eax
L0017: mov [rsp+0x28], rax
L001c: vxorps xmm4, xmm4, xmm4
L0020: vmovdqa [rsp+0x30], xmm4
L0026: vmovdqa [rsp+0x40], xmm4
L002c: mov rsi, rcx
L002f: mov [rsp+0x38], edx
L0033: vmovd xmm0, [rsp+0x38]
L0039: vpbroadcastd ymm6, xmm0
L003e: xor edi, edi
L0040: lea rdx, [rsp+0x28]
L0045: mov rcx, rsi
L0048: vextractf128 xmm7, ymm6, 1
L004e: call BranchNode`2[[BranchNode`2[[LeafNode`1[[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]].get_VectorIndices()
L0053: xor r8d, r8d
L0056: cmp dword ptr [rsp+0x30], 0
L005b: vinsertf128 ymm6, ymm6, xmm7, 1
L0061: jle short L00a4
L0063: mov r9, [rsp+0x28]
L0068: movsxd rcx, r8d
L006b: shl rcx, 5
L006f: vmovupd ymm0, [r9+rcx]
L0075: vpcmpgtd ymm0, ymm0, ymm6
L0079: vmovmskps r9d, ymm0
L007d: or r9d, 0xffffff00
L0084: tzcnt r9d, r9d
L0089: lea eax, [rdi+r9]
L008d: cmp eax, [rsi]
L008f: jge short L00be
L0091: cmp r9d, 8
L0095: jl short L00d8
L0097: add edi, 8
L009a: inc r8d
L009d: cmp r8d, [rsp+0x30]
L00a2: jl short L0063
L00a4: mov r8d, [rsi]
L00a7: dec r8d
L00aa: lea r9, [rsp+0x38]
L00af: lea rcx, [rsp+0x40]
L00b4: mov rdx, rsi
L00b7: call BranchNode`2[[BranchNode`2[[LeafNode`1[[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]].<FindChildV>g__Return|14_0(BranchNode`2<BranchNode`2<LeafNode`1<Int32>,Int32>,Int32> ByRef, Int32, <>c__DisplayClass14_0<BranchNode`2<LeafNode`1<Int32>,Int32>,Int32> ByRef)
L00bc: jmp short L00ed
L00be: mov r8d, [rsi]
L00c1: dec r8d
L00c4: lea r9, [rsp+0x38]
L00c9: lea rcx, [rsp+0x40]
L00ce: mov rdx, rsi
L00d1: call BranchNode`2[[BranchNode`2[[LeafNode`1[[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]].<FindChildV>g__Return|14_0(BranchNode`2<BranchNode`2<LeafNode`1<Int32>,Int32>,Int32> ByRef, Int32, <>c__DisplayClass14_0<BranchNode`2<LeafNode`1<Int32>,Int32>,Int32> ByRef)
L00d6: jmp short L00ed
L00d8: lea rcx, [rsp+0x40]
L00dd: lea r9, [rsp+0x38]
L00e2: mov rdx, rsi
L00e5: mov r8d, eax
L00e8: call BranchNode`2[[BranchNode`2[[LeafNode`1[[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]].<FindChildV>g__Return|14_0(BranchNode`2<BranchNode`2<LeafNode`1<Int32>,Int32>,Int32> ByRef, Int32, <>c__DisplayClass14_0<BranchNode`2<LeafNode`1<Int32>,Int32>,Int32> ByRef)
L00ed: mov rcx, [rsp+0x40]
L00f2: mov edx, [rsp+0x48]
L00f6: cmp [rcx], ecx
L00f8: add rcx, 8
L00fc: call BranchNode`2[[LeafNode`1[[System.Int32, System.Private.CoreLib]], _],[System.Int32, System.Private.CoreLib]].get_Item(Int32)
L0101: nop
L0102: vmovaps xmm6, [rsp+0x60]
L0108: vmovaps xmm7, [rsp+0x50]
L010e: vzeroupper
L0111: add rsp, 0x78
L0115: pop rsi
L0116: pop rdi
L0117: ret