Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
iterator_with_predicate vs. _if
std::copy(iwp.begin(), iwp.end(), ys.begin());
00007FF6AE901094 movups xmm0,xmmword ptr [rbp-29h]
00007FF6AE901098 movups xmmword ptr [rbp-29h],xmm0
00007FF6AE90109C mov rax,qword ptr [rbp-19h]
00007FF6AE9010A0 mov qword ptr [rbp-29h],rax
00007FF6AE9010A4 movzx ecx,byte ptr [rax]
00007FF6AE9010A7 not cl
00007FF6AE9010A9 test cl,1
00007FF6AE9010AC jne test_efficiency+0D9h (07FF6AE9010D9h)
00007FF6AE9010AE lea rcx,[rax+4]
00007FF6AE9010B2 mov rax,rcx
00007FF6AE9010B5 mov qword ptr [rbp-29h],rcx
00007FF6AE9010B9 mov rdx,qword ptr [rbp-21h]
00007FF6AE9010BD cmp rcx,rdx
00007FF6AE9010C0 je test_efficiency+0D9h (07FF6AE9010D9h)
00007FF6AE9010C2 movzx ecx,byte ptr [rax]
00007FF6AE9010C5 not cl
00007FF6AE9010C7 test cl,1
00007FF6AE9010CA jne test_efficiency+0D5h (07FF6AE9010D5h)
00007FF6AE9010CC add rax,4
00007FF6AE9010D0 cmp rax,rdx
00007FF6AE9010D3 jne test_efficiency+0C2h (07FF6AE9010C2h)
00007FF6AE9010D5 mov qword ptr [rbp-29h],rax
00007FF6AE9010D9 movups xmm0,xmmword ptr [rbp-29h]
00007FF6AE9010DD movaps xmmword ptr [rbp+17h],xmm0
00007FF6AE9010E1 mov r8,qword ptr [rbp+27h]
00007FF6AE9010E5 cmp rax,rbx
00007FF6AE9010E8 je test_efficiency+129h (07FF6AE901129h)
00007FF6AE9010EA mov rdx,qword ptr [rbp+1Fh]
00007FF6AE9010EE mov rcx,qword ptr [rbp+17h]
00007FF6AE9010F2 nop dword ptr [rax]
00007FF6AE9010F6 nop word ptr [rax+rax]
00007FF6AE901100 mov eax,dword ptr [rcx]
00007FF6AE901102 mov dword ptr [r8],eax
00007FF6AE901105 lea r8,[r8+4]
00007FF6AE901109 add rcx,4
00007FF6AE90110D cmp rcx,rdx
00007FF6AE901110 je test_efficiency+124h (07FF6AE901124h)
00007FF6AE901112 movzx eax,byte ptr [rcx]
00007FF6AE901115 not al
00007FF6AE901117 test al,1
00007FF6AE901119 jne test_efficiency+124h (07FF6AE901124h)
00007FF6AE90111B add rcx,4
00007FF6AE90111F cmp rcx,rdx
00007FF6AE901122 jne test_efficiency+112h (07FF6AE901112h)
00007FF6AE901124 cmp rcx,rbx
00007FF6AE901127 jne test_efficiency+100h (07FF6AE901100h)
std::copy_if(xs.begin(), xs.end(), zs.begin(), is_even);
00007FF6AE901147 mov rbx,qword ptr [rbp-39h]
00007FF6AE90114B mov rcx,rbx
00007FF6AE90114E mov r8,qword ptr [rbp-19h]
00007FF6AE901152 mov r9,rsi
00007FF6AE901155 mov r10,qword ptr [rbp-11h]
00007FF6AE901159 sub r10,r8
00007FF6AE90115C add r10,3
00007FF6AE901160 shr r10,2
00007FF6AE901164 cmp r8,qword ptr [rbp-11h]
00007FF6AE901168 cmova r10,rsi
00007FF6AE90116C test r10,r10
00007FF6AE90116F je test_efficiency+193h (07FF6AE901193h)
00007FF6AE901171 movzx eax,byte ptr [r8]
00007FF6AE901175 not al
00007FF6AE901177 test al,1
00007FF6AE901179 je test_efficiency+187h (07FF6AE901187h)
00007FF6AE90117B mov rax,rcx
00007FF6AE90117E add rcx,4
00007FF6AE901182 mov edx,dword ptr [r8]
00007FF6AE901185 mov dword ptr [rax],edx
00007FF6AE901187 add r8,4
00007FF6AE90118B inc r9
00007FF6AE90118E cmp r9,r10
00007FF6AE901191 jne test_efficiency+171h (07FF6AE901171h)
00007FF6AE901193 mov rdi,qword ptr [rbp-31h]
00007FF6AE901197 sub rdi,rbx
00007FF6AE90119A add rdi,3
00007FF6AE90119E shr rdi,2
00007FF6AE9011A2 cmp rbx,qword ptr [rbp-31h]
00007FF6AE9011A6 cmova rdi,rsi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment