2 ms·
Overly complex C++11: http://ideone.com/yHzej http://ideone.com/yHzej The output assembly is actually pretty good (std::vector specialization): ; prol
by pbsd 14y ago
Overly complex C++11: http://ideone.com/yHzej http://ideone.com/yHzej
The output assembly is actually pretty good (std::vector specialization):
; prologue
L19:
add eax, esi
cmp ebx, eax
je L4
L8:
mov ecx, DWORD PTR [eax]
cmp ecx, DWORD PTR [edi]
.p2align 4,,3
jne L10
add ecx, 1
sub edx, 1
mov DWORD PTR [eax], ecx
L10:
test edx, edx
jg L19
L4:
; epilogue