-
-
Save DanielKeep/9cba82d22df10946bb4d to your computer and use it in GitHub Desktop.
Struct copy benchmark results
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
Running target\release\bench_yich-33238ad2a15cba57.exe | |
running 0 tests | |
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured | |
Running target\release\benches-a247be756fcf517f.exe | |
running 4 tests | |
test bench_many_c ... bench: 105,897 ns/iter (+/- 7,498) | |
test bench_many_rust ... bench: 134,012 ns/iter (+/- 3,699) | |
test bench_one_c ... bench: 29 ns/iter (+/- 0) | |
test bench_one_rust ... bench: 80 ns/iter (+/- 2) | |
test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured |
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
.def __ZN20copy_struct_one_rust20h4f6833aa9da89dbdPaaE; | |
.scl 2; | |
.type 32; | |
.endef | |
.globl __ZN20copy_struct_one_rust20h4f6833aa9da89dbdPaaE | |
.align 16, 0x90 | |
__ZN20copy_struct_one_rust20h4f6833aa9da89dbdPaaE: | |
.cfi_startproc | |
subl $12, %esp | |
Ltmp6: | |
.cfi_def_cfa_offset 16 | |
movl 20(%esp), %eax | |
movl 16(%esp), %ecx | |
movl %ecx, 4(%esp) | |
movl %eax, (%esp) | |
movl $400, 8(%esp) | |
calll _memcpy | |
addl $12, %esp | |
retl | |
.cfi_endproc | |
.def __ZN21copy_struct_many_rust20hfdf380f818cc18a86aaE; | |
.scl 2; | |
.type 32; | |
.endef | |
.globl __ZN21copy_struct_many_rust20hfdf380f818cc18a86aaE | |
.align 16, 0x90 | |
__ZN21copy_struct_many_rust20hfdf380f818cc18a86aaE: | |
.cfi_startproc | |
pushl %ebp | |
Ltmp7: | |
.cfi_def_cfa_offset 8 | |
pushl %ebx | |
Ltmp8: | |
.cfi_def_cfa_offset 12 | |
pushl %edi | |
Ltmp9: | |
.cfi_def_cfa_offset 16 | |
pushl %esi | |
Ltmp10: | |
.cfi_def_cfa_offset 20 | |
subl $12, %esp | |
Ltmp11: | |
.cfi_def_cfa_offset 32 | |
Ltmp12: | |
.cfi_offset %esi, -20 | |
Ltmp13: | |
.cfi_offset %edi, -16 | |
Ltmp14: | |
.cfi_offset %ebx, -12 | |
Ltmp15: | |
.cfi_offset %ebp, -8 | |
movl 44(%esp), %edx | |
testl %edx, %edx | |
je LBB3_5 | |
movl 36(%esp), %ecx | |
testl %ecx, %ecx | |
je LBB3_5 | |
movl 40(%esp), %esi | |
movl 32(%esp), %eax | |
imull $400, %ecx, %ecx | |
leal (%ecx,%eax), %edi | |
movl %eax, %ecx | |
addl $400, %ecx | |
imull $400, %edx, %ebx | |
addl $-400, %ebx | |
.align 16, 0x90 | |
LBB3_3: | |
movl %ecx, %ebp | |
movl %eax, 4(%esp) | |
movl %esi, (%esp) | |
movl $400, 8(%esp) | |
calll _memcpy | |
leal 400(%ebp), %ecx | |
cmpl %edi, %ebp | |
cmovel %ebp, %ecx | |
movl %ebp, %eax | |
movl $0, %edx | |
cmovel %edx, %eax | |
testl %ebx, %ebx | |
je LBB3_5 | |
addl $400, %esi | |
addl $-400, %ebx | |
testl %eax, %eax | |
jne LBB3_3 | |
LBB3_5: | |
addl $12, %esp | |
popl %esi | |
popl %edi | |
popl %ebx | |
popl %ebp | |
retl | |
.cfi_endproc | |
.def _copy_struct_one_c; | |
.scl 2; | |
.type 32; | |
.endef | |
_copy_struct_one_c: | |
LFB1: | |
.cfi_startproc | |
pushl %edi | |
.cfi_def_cfa_offset 8 | |
.cfi_offset 7, -8 | |
pushl %esi | |
.cfi_def_cfa_offset 12 | |
.cfi_offset 6, -12 | |
movl 12(%esp), %esi | |
movl 16(%esp), %ecx | |
movl (%esi), %eax | |
leal 4(%ecx), %edi | |
andl $-4, %edi | |
movl %eax, (%ecx) | |
movl 396(%esi), %eax | |
movl %eax, 396(%ecx) | |
subl %edi, %ecx | |
subl %ecx, %esi | |
addl $400, %ecx | |
shrl $2, %ecx | |
rep movsl | |
popl %esi | |
.cfi_restore 6 | |
.cfi_def_cfa_offset 8 | |
popl %edi | |
.cfi_restore 7 | |
.cfi_def_cfa_offset 4 | |
ret | |
.cfi_endproc | |
.def _copy_struct_many_c; | |
.scl 2; | |
.type 32; | |
.endef | |
_copy_struct_many_c: | |
LFB2: | |
.cfi_startproc | |
pushl %ebp | |
.cfi_def_cfa_offset 8 | |
.cfi_offset 5, -8 | |
pushl %edi | |
.cfi_def_cfa_offset 12 | |
.cfi_offset 7, -12 | |
pushl %esi | |
.cfi_def_cfa_offset 16 | |
.cfi_offset 6, -16 | |
pushl %ebx | |
.cfi_def_cfa_offset 20 | |
.cfi_offset 3, -20 | |
movl 28(%esp), %ebp | |
movl 20(%esp), %ebx | |
movl 24(%esp), %edx | |
testl %ebp, %ebp | |
je L3 | |
imull $400, %ebp, %ebp | |
xorl %eax, %eax | |
.p2align 4,,10 | |
L5: | |
leal (%ebx,%eax), %esi | |
leal (%edx,%eax), %ecx | |
addl $400, %eax | |
movl (%esi), %edi | |
movl %edi, (%ecx) | |
movl 396(%esi), %edi | |
movl %edi, 396(%ecx) | |
leal 4(%ecx), %edi | |
andl $-4, %edi | |
subl %edi, %ecx | |
subl %ecx, %esi | |
addl $400, %ecx | |
shrl $2, %ecx | |
cmpl %ebp, %eax | |
rep movsl | |
jne L5 | |
L3: | |
popl %ebx | |
.cfi_restore 3 | |
.cfi_def_cfa_offset 16 | |
popl %esi | |
.cfi_restore 6 | |
.cfi_def_cfa_offset 12 | |
popl %edi | |
.cfi_restore 7 | |
.cfi_def_cfa_offset 8 | |
popl %ebp | |
.cfi_restore 5 | |
.cfi_def_cfa_offset 4 | |
ret | |
.cfi_endproc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment