Skip to content

Instantly share code, notes, and snippets.

@durka

durka/1before.sh Secret

Last active February 6, 2016 20:55
Show Gist options
  • Save durka/206b1a04ff57ea4c95fd to your computer and use it in GitHub Desktop.
Save durka/206b1a04ff57ea4c95fd to your computer and use it in GitHub Desktop.
$ RUSTC=../build-master/x86_64-apple-darwin/stage1/bin/rustc cargo bench
Compiling bench-copyclone v0.1.0 (file:///Users/alex/Programming/rust/rust/bench-copyclone)
Running target/release/bench_copyclone-6cd5f5efab249350
running 6 tests
test bench_clone_composite ... bench: 10,459 ns/iter (+/- 1,743)
test bench_clone_composite_big ... bench: 20,138 ns/iter (+/- 5,325)
test bench_copy_composite ... bench: 10,376 ns/iter (+/- 630)
test bench_copy_composite_big ... bench: 20,092 ns/iter (+/- 894)
test bench_i32 ... bench: 2,663 ns/iter (+/- 421)
test bench_u8 ... bench: 386 ns/iter (+/- 96)
test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured
$ RUSTC=../build-clone-copy/x86_64-apple-darwin/stage1/bin/rustc cargo bench
Compiling bench-copyclone v0.1.0 (file:///Users/alex/Programming/rust/rust/bench-copyclone)
[dead code warnings snipped]
Running target/release/bench_copyclone-6cd5f5efab249350
running 6 tests
test bench_clone_composite ... bench: 10,521 ns/iter (+/- 8,022)
test bench_clone_composite_big ... bench: 20,153 ns/iter (+/- 4,069)
test bench_copy_composite ... bench: 5,339 ns/iter (+/- 821)
test bench_copy_composite_big ... bench: 20,139 ns/iter (+/- 1,529)
test bench_i32 ... bench: 3,247 ns/iter (+/- 1,389)
test bench_u8 ... bench: 396 ns/iter (+/- 66)
test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured
#![feature(test)]
extern crate test;
use test::{Bencher, black_box};
#[bench]
fn bench_u8(b: &mut Bencher) {
let u8s = black_box(vec![1u8; 16384]);
let mut u8d = black_box(vec![1u8; 16384]);
b.iter(|| copy(&u8s, &mut u8d));
}
#[bench]
fn bench_i32(b: &mut Bencher) {
let i32s = black_box(vec![2i32; 16384]);
let mut i32d = black_box(vec![2i32; 16384]);
b.iter(|| copy_i32(&i32s, &mut i32d));
}
#[bench]
fn bench_clone_composite(b: &mut Bencher) {
let clcomps = black_box(vec![Composite { x: 3, y: 4 }; 16384]);
let mut clcompd = black_box(vec![Composite { x: 3, y: 4 }; 16384]);
b.iter(|| clone_composite(&clcomps, &mut clcompd));
}
#[bench]
fn bench_copy_composite(b: &mut Bencher) {
let ccomps = black_box(vec![CopyComposite { x: 5, y: 6 }; 16384]);
let mut ccompd = black_box(vec![CopyComposite { x: 5, y: 6 }; 16384]);
b.iter(|| copy_composite(&ccomps, &mut ccompd));
}
#[bench]
fn bench_clone_composite_big(b: &mut Bencher) {
let clbcomps = black_box(vec![BigComposite { x: 7, y: 8 }; 16384]);
let mut clbcompd = black_box(vec![BigComposite { x: 7, y: 8 }; 16384]);
b.iter(|| clone_composite_big(&clbcomps, &mut clbcompd));
}
#[bench]
fn bench_copy_composite_big(b: &mut Bencher) {
let cbcomps = black_box(vec![BigCopyComposite { x: 9, y: 10 }; 16384]);
let mut cbcompd = black_box(vec![BigCopyComposite { x: 9, y: 10 }; 16384]);
b.iter(|| copy_composite_big(&cbcomps, &mut cbcompd));
}
// memcpy
pub fn copy(x: &[u8], y: &mut [u8]) {
y.clone_from_slice(x)
}
// memcpy
pub fn copy_i32(x: &[i32], y: &mut [i32]) {
y.clone_from_slice(x)
}
// write byte, write u32 loop
pub fn clone_composite(x: &[Composite], y: &mut [Composite]) {
y.clone_from_slice(x)
}
// memcpy
pub fn copy_composite(x: &[CopyComposite], y: &mut [CopyComposite]) {
y.clone_from_slice(x)
}
pub fn clone_composite_big(x: &[BigComposite], y: &mut [BigComposite]) {
y.clone_from_slice(x)
}
pub fn copy_composite_big(x: &[BigCopyComposite], y: &mut [BigCopyComposite]) {
y.clone_from_slice(x)
}
#[derive(Clone)] // deep clone
pub struct Composite {
x: u8,
y: u32,
}
#[derive(Copy, Clone)] // shallow clone
pub struct CopyComposite {
x: u8,
y: u32,
}
#[derive(Clone)] // deep clone
pub struct BigComposite {
x: u8,
y: u64,
}
#[derive(Copy, Clone)] // shallow clone
pub struct BigCopyComposite {
x: u8,
y: u64,
}
.section __TEXT,__text,regular,pure_instructions
.globl __ZN4copy20he4d26d3d5891884aiaaE
.align 4, 0x90
__ZN4copy20he4d26d3d5891884aiaaE:
.cfi_startproc
movq %rdi, %rax
cmpq %rsi, %rcx
jne LBB0_3
testq %rcx, %rcx
je LBB0_2
movq %rdx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
jmp _memcpy
LBB0_2:
retq
LBB0_3:
pushq %rbp
Ltmp0:
.cfi_def_cfa_offset 16
Ltmp1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp2:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20ha1f16444cd71fd899EPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h5b116cb444de10f6XWLE
.cfi_endproc
.globl __ZN8copy_i3220h840d4ea308225852yaaE
.align 4, 0x90
__ZN8copy_i3220h840d4ea308225852yaaE:
.cfi_startproc
movq %rdi, %rax
cmpq %rsi, %rcx
jne LBB1_3
testq %rcx, %rcx
je LBB1_2
shlq $2, %rcx
movq %rdx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
jmp _memcpy
LBB1_2:
retq
LBB1_3:
pushq %rbp
Ltmp3:
.cfi_def_cfa_offset 16
Ltmp4:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp5:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20ha1f16444cd71fd899EPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h5b116cb444de10f6XWLE
.cfi_endproc
.globl __ZN15clone_composite20hddfe685f3e8bd6ecOaaE
.align 4, 0x90
__ZN15clone_composite20hddfe685f3e8bd6ecOaaE:
.cfi_startproc
cmpq %rsi, %rcx
jne LBB2_8
testq %rcx, %rcx
je LBB2_7
xorl %esi, %esi
testb $1, %cl
je LBB2_4
movl 4(%rdi), %eax
shlq $32, %rax
movzbl (%rdi), %esi
orq %rax, %rsi
movq %rsi, (%rdx)
movl $1, %esi
LBB2_4:
cmpq $1, %rcx
je LBB2_7
subq %rsi, %rcx
leaq 12(%rdi,%rsi,8), %rax
leaq 8(%rdx,%rsi,8), %rdx
.align 4, 0x90
LBB2_6:
movl -8(%rax), %esi
shlq $32, %rsi
movzbl -12(%rax), %edi
orq %rsi, %rdi
movq %rdi, -8(%rdx)
movl (%rax), %esi
shlq $32, %rsi
movzbl -4(%rax), %edi
orq %rsi, %rdi
movq %rdi, (%rdx)
addq $16, %rax
addq $16, %rdx
addq $-2, %rcx
jne LBB2_6
LBB2_7:
retq
LBB2_8:
pushq %rbp
Ltmp6:
.cfi_def_cfa_offset 16
Ltmp7:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp8:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20ha1f16444cd71fd899EPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h5b116cb444de10f6XWLE
.cfi_endproc
.globl __ZN29Composite...std..clone..Clone5clone20h9d8b2a3c211e91e8YbaE
.align 4, 0x90
__ZN29Composite...std..clone..Clone5clone20h9d8b2a3c211e91e8YbaE:
.cfi_startproc
pushq %rbp
Ltmp9:
.cfi_def_cfa_offset 16
Ltmp10:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp11:
.cfi_def_cfa_register %rbp
movl 4(%rdi), %ecx
shlq $32, %rcx
movzbl (%rdi), %eax
orq %rcx, %rax
popq %rbp
retq
.cfi_endproc
.globl __ZN14copy_composite20hd6074ecc9ed0423a4aaE
.align 4, 0x90
__ZN14copy_composite20hd6074ecc9ed0423a4aaE:
.cfi_startproc
cmpq %rsi, %rcx
jne LBB4_8
testq %rcx, %rcx
je LBB4_7
xorl %esi, %esi
testb $1, %cl
je LBB4_4
movl 4(%rdi), %eax
shlq $32, %rax
movzbl (%rdi), %esi
orq %rax, %rsi
movq %rsi, (%rdx)
movl $1, %esi
LBB4_4:
cmpq $1, %rcx
je LBB4_7
subq %rsi, %rcx
leaq 12(%rdi,%rsi,8), %rax
leaq 8(%rdx,%rsi,8), %rdx
.align 4, 0x90
LBB4_6:
movl -8(%rax), %esi
shlq $32, %rsi
movzbl -12(%rax), %edi
orq %rsi, %rdi
movq %rdi, -8(%rdx)
movl (%rax), %esi
shlq $32, %rsi
movzbl -4(%rax), %edi
orq %rsi, %rdi
movq %rdi, (%rdx)
addq $16, %rax
addq $16, %rdx
addq $-2, %rcx
jne LBB4_6
LBB4_7:
retq
LBB4_8:
pushq %rbp
Ltmp12:
.cfi_def_cfa_offset 16
Ltmp13:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp14:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20ha1f16444cd71fd899EPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h5b116cb444de10f6XWLE
.cfi_endproc
.globl __ZN33CopyComposite...std..clone..Clone5clone20h89ed2808982d2290zcaE
.align 4, 0x90
__ZN33CopyComposite...std..clone..Clone5clone20h89ed2808982d2290zcaE:
.cfi_startproc
pushq %rbp
Ltmp15:
.cfi_def_cfa_offset 16
Ltmp16:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp17:
.cfi_def_cfa_register %rbp
movl 4(%rdi), %ecx
shlq $32, %rcx
movzbl (%rdi), %eax
orq %rcx, %rax
popq %rbp
retq
.cfi_endproc
.globl __ZN19clone_composite_big20hab62497813ac0bf7kbaE
.align 4, 0x90
__ZN19clone_composite_big20hab62497813ac0bf7kbaE:
.cfi_startproc
cmpq %rsi, %rcx
jne LBB6_8
testq %rcx, %rcx
je LBB6_7
xorl %esi, %esi
testb $1, %cl
je LBB6_4
movb (%rdi), %al
movq 8(%rdi), %rsi
movb %al, (%rdx)
movq %rsi, 8(%rdx)
movl $1, %esi
LBB6_4:
cmpq $1, %rcx
je LBB6_7
subq %rsi, %rcx
shlq $4, %rsi
leaq 24(%rdx,%rsi), %rax
leaq 24(%rdi,%rsi), %rdx
.align 4, 0x90
LBB6_6:
movb -24(%rdx), %sil
movq -16(%rdx), %rdi
movb %sil, -24(%rax)
movq %rdi, -16(%rax)
movb -8(%rdx), %sil
movq (%rdx), %rdi
movb %sil, -8(%rax)
movq %rdi, (%rax)
addq $32, %rax
addq $32, %rdx
addq $-2, %rcx
jne LBB6_6
LBB6_7:
retq
LBB6_8:
pushq %rbp
Ltmp18:
.cfi_def_cfa_offset 16
Ltmp19:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp20:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20ha1f16444cd71fd899EPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h5b116cb444de10f6XWLE
.cfi_endproc
.globl __ZN32BigComposite...std..clone..Clone5clone20h7af44537953445cbedaE
.align 4, 0x90
__ZN32BigComposite...std..clone..Clone5clone20h7af44537953445cbedaE:
.cfi_startproc
pushq %rbp
Ltmp21:
.cfi_def_cfa_offset 16
Ltmp22:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp23:
.cfi_def_cfa_register %rbp
movb (%rsi), %al
movb %al, (%rdi)
movq 8(%rsi), %rax
movq %rax, 8(%rdi)
movq %rdi, %rax
popq %rbp
retq
.cfi_endproc
.globl __ZN18copy_composite_big20h962ffb37a0d336cdAbaE
.align 4, 0x90
__ZN18copy_composite_big20h962ffb37a0d336cdAbaE:
.cfi_startproc
cmpq %rsi, %rcx
jne LBB8_8
testq %rcx, %rcx
je LBB8_7
xorl %esi, %esi
testb $1, %cl
je LBB8_4
movb (%rdi), %al
movq 8(%rdi), %rsi
movb %al, (%rdx)
movq %rsi, 8(%rdx)
movl $1, %esi
LBB8_4:
cmpq $1, %rcx
je LBB8_7
subq %rsi, %rcx
shlq $4, %rsi
leaq 24(%rdx,%rsi), %rax
leaq 24(%rdi,%rsi), %rdx
.align 4, 0x90
LBB8_6:
movb -24(%rdx), %sil
movq -16(%rdx), %rdi
movb %sil, -24(%rax)
movq %rdi, -16(%rax)
movb -8(%rdx), %sil
movq (%rdx), %rdi
movb %sil, -8(%rax)
movq %rdi, (%rax)
addq $32, %rax
addq $32, %rdx
addq $-2, %rcx
jne LBB8_6
LBB8_7:
retq
LBB8_8:
pushq %rbp
Ltmp24:
.cfi_def_cfa_offset 16
Ltmp25:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp26:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20ha1f16444cd71fd899EPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h5b116cb444de10f6XWLE
.cfi_endproc
.globl __ZN36BigCopyComposite...std..clone..Clone5clone20he2314d97ec6b6e86PdaE
.align 4, 0x90
__ZN36BigCopyComposite...std..clone..Clone5clone20he2314d97ec6b6e86PdaE:
.cfi_startproc
pushq %rbp
Ltmp27:
.cfi_def_cfa_offset 16
Ltmp28:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp29:
.cfi_def_cfa_register %rbp
movb (%rsi), %al
movb %al, (%rdi)
movq 8(%rsi), %rax
movq %rax, 8(%rdi)
movq %rdi, %rax
popq %rbp
retq
.cfi_endproc
.subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions
.globl __ZN4copy20h8f5900b07fe01f96iaaE
.align 4, 0x90
__ZN4copy20h8f5900b07fe01f96iaaE:
.cfi_startproc
movq %rdi, %rax
cmpq %rsi, %rcx
jne LBB0_3
testq %rcx, %rcx
je LBB0_2
movq %rdx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
jmp _memcpy
LBB0_2:
retq
LBB0_3:
pushq %rbp
Ltmp0:
.cfi_def_cfa_offset 16
Ltmp1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp2:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20h4b9a75b23b85d7fcuDPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h7da9b54582d039c2zVLE
.cfi_endproc
.globl __ZN8copy_i3220ha852e6967d9af499yaaE
.align 4, 0x90
__ZN8copy_i3220ha852e6967d9af499yaaE:
.cfi_startproc
movq %rdi, %rax
cmpq %rsi, %rcx
jne LBB1_3
testq %rcx, %rcx
je LBB1_2
shlq $2, %rcx
movq %rdx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
jmp _memcpy
LBB1_2:
retq
LBB1_3:
pushq %rbp
Ltmp3:
.cfi_def_cfa_offset 16
Ltmp4:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp5:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20h4b9a75b23b85d7fcuDPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h7da9b54582d039c2zVLE
.cfi_endproc
.globl __ZN15clone_composite20hb4161fd4ad3a4c09OaaE
.align 4, 0x90
__ZN15clone_composite20hb4161fd4ad3a4c09OaaE:
.cfi_startproc
cmpq %rsi, %rcx
jne LBB2_8
testq %rcx, %rcx
je LBB2_7
xorl %esi, %esi
testb $1, %cl
je LBB2_4
movl 4(%rdi), %eax
shlq $32, %rax
movzbl (%rdi), %esi
orq %rax, %rsi
movq %rsi, (%rdx)
movl $1, %esi
LBB2_4:
cmpq $1, %rcx
je LBB2_7
subq %rsi, %rcx
leaq 12(%rdi,%rsi,8), %rax
leaq 8(%rdx,%rsi,8), %rdx
.align 4, 0x90
LBB2_6:
movl -8(%rax), %esi
shlq $32, %rsi
movzbl -12(%rax), %edi
orq %rsi, %rdi
movq %rdi, -8(%rdx)
movl (%rax), %esi
shlq $32, %rsi
movzbl -4(%rax), %edi
orq %rsi, %rdi
movq %rdi, (%rdx)
addq $16, %rax
addq $16, %rdx
addq $-2, %rcx
jne LBB2_6
LBB2_7:
retq
LBB2_8:
pushq %rbp
Ltmp6:
.cfi_def_cfa_offset 16
Ltmp7:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp8:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20h4b9a75b23b85d7fcuDPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h7da9b54582d039c2zVLE
.cfi_endproc
.globl __ZN29Composite...std..clone..Clone5clone20hb95eb5fcba117018YbaE
.align 4, 0x90
__ZN29Composite...std..clone..Clone5clone20hb95eb5fcba117018YbaE:
.cfi_startproc
pushq %rbp
Ltmp9:
.cfi_def_cfa_offset 16
Ltmp10:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp11:
.cfi_def_cfa_register %rbp
movl 4(%rdi), %ecx
shlq $32, %rcx
movzbl (%rdi), %eax
orq %rcx, %rax
popq %rbp
retq
.cfi_endproc
.globl __ZN14copy_composite20h90d4bf749290b5484aaE
.align 4, 0x90
__ZN14copy_composite20h90d4bf749290b5484aaE:
.cfi_startproc
movq %rdi, %rax
cmpq %rsi, %rcx
jne LBB4_3
testq %rcx, %rcx
je LBB4_2
shlq $3, %rcx
movq %rdx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
jmp _memcpy
LBB4_2:
retq
LBB4_3:
pushq %rbp
Ltmp12:
.cfi_def_cfa_offset 16
Ltmp13:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp14:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20h4b9a75b23b85d7fcuDPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h7da9b54582d039c2zVLE
.cfi_endproc
.globl __ZN33CopyComposite...std..clone..Clone5clone20hea6bed20cf8a85bfzcaE
.align 4, 0x90
__ZN33CopyComposite...std..clone..Clone5clone20hea6bed20cf8a85bfzcaE:
.cfi_startproc
pushq %rbp
Ltmp15:
.cfi_def_cfa_offset 16
Ltmp16:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp17:
.cfi_def_cfa_register %rbp
movq (%rdi), %rax
popq %rbp
retq
.cfi_endproc
.globl __ZN19clone_composite_big20h30aae394c4ca369fkbaE
.align 4, 0x90
__ZN19clone_composite_big20h30aae394c4ca369fkbaE:
.cfi_startproc
cmpq %rsi, %rcx
jne LBB6_8
testq %rcx, %rcx
je LBB6_7
xorl %esi, %esi
testb $1, %cl
je LBB6_4
movb (%rdi), %al
movq 8(%rdi), %rsi
movb %al, (%rdx)
movq %rsi, 8(%rdx)
movl $1, %esi
LBB6_4:
cmpq $1, %rcx
je LBB6_7
subq %rsi, %rcx
shlq $4, %rsi
leaq 24(%rdx,%rsi), %rax
leaq 24(%rdi,%rsi), %rdx
.align 4, 0x90
LBB6_6:
movb -24(%rdx), %sil
movq -16(%rdx), %rdi
movb %sil, -24(%rax)
movq %rdi, -16(%rax)
movb -8(%rdx), %sil
movq (%rdx), %rdi
movb %sil, -8(%rax)
movq %rdi, (%rax)
addq $32, %rax
addq $32, %rdx
addq $-2, %rcx
jne LBB6_6
LBB6_7:
retq
LBB6_8:
pushq %rbp
Ltmp18:
.cfi_def_cfa_offset 16
Ltmp19:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp20:
.cfi_def_cfa_register %rbp
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20h4b9a75b23b85d7fcuDPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h7da9b54582d039c2zVLE
.cfi_endproc
.globl __ZN32BigComposite...std..clone..Clone5clone20heaa2cc57402995f4XcaE
.align 4, 0x90
__ZN32BigComposite...std..clone..Clone5clone20heaa2cc57402995f4XcaE:
.cfi_startproc
pushq %rbp
Ltmp21:
.cfi_def_cfa_offset 16
Ltmp22:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp23:
.cfi_def_cfa_register %rbp
movb (%rsi), %al
movb %al, (%rdi)
movq 8(%rsi), %rax
movq %rax, 8(%rdi)
movq %rdi, %rax
popq %rbp
retq
.cfi_endproc
.globl __ZN18copy_composite_big20hff133c18022c5fd5AbaE
.align 4, 0x90
__ZN18copy_composite_big20hff133c18022c5fd5AbaE:
.cfi_startproc
pushq %rbp
Ltmp24:
.cfi_def_cfa_offset 16
Ltmp25:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp26:
.cfi_def_cfa_register %rbp
pushq %rbx
pushq %rax
Ltmp27:
.cfi_offset %rbx, -24
cmpq %rsi, %rcx
jne LBB8_9
testq %rcx, %rcx
je LBB8_8
leaq -1(%rcx), %r8
xorl %eax, %eax
testb $3, %cl
je LBB8_5
movl %ecx, %r9d
andl $3, %r9d
xorl %eax, %eax
movq %rdi, %r10
movq %rdx, %rsi
.align 4, 0x90
LBB8_4:
incq %rax
movq (%r10), %r11
movq 8(%r10), %rbx
movq %rbx, 8(%rsi)
movq %r11, (%rsi)
addq $16, %rsi
addq $16, %r10
cmpq %rax, %r9
jne LBB8_4
LBB8_5:
cmpq $3, %r8
jb LBB8_8
subq %rax, %rcx
shlq $4, %rax
.align 4, 0x90
LBB8_7:
movq (%rdi,%rax), %rsi
movq 8(%rdi,%rax), %rbx
movq %rbx, 8(%rdx,%rax)
movq %rsi, (%rdx,%rax)
movq 16(%rdi,%rax), %rsi
movq 24(%rdi,%rax), %rbx
movq %rbx, 24(%rdx,%rax)
movq %rsi, 16(%rdx,%rax)
movq 32(%rdi,%rax), %rsi
movq 40(%rdi,%rax), %rbx
movq %rbx, 40(%rdx,%rax)
movq %rsi, 32(%rdx,%rax)
movq 48(%rdi,%rax), %rsi
movq 56(%rdi,%rax), %rbx
movq %rbx, 56(%rdx,%rax)
movq %rsi, 48(%rdx,%rax)
addq $64, %rdx
addq $64, %rdi
addq $-4, %rcx
jne LBB8_7
LBB8_8:
addq $8, %rsp
popq %rbx
popq %rbp
retq
LBB8_9:
movq __ZN5slice21_$u5b$T$u5d$.SliceExt16clone_from_slice14_MSG_FILE_LINE20h4b9a75b23b85d7fcuDPE@GOTPCREL(%rip), %rdi
callq __ZN9panicking5panic20h7da9b54582d039c2zVLE
.cfi_endproc
.globl __ZN36BigCopyComposite...std..clone..Clone5clone20hdf3ea0138d0616fdydaE
.align 4, 0x90
__ZN36BigCopyComposite...std..clone..Clone5clone20hdf3ea0138d0616fdydaE:
.cfi_startproc
pushq %rbp
Ltmp28:
.cfi_def_cfa_offset 16
Ltmp29:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp30:
.cfi_def_cfa_register %rbp
movq (%rsi), %rax
movq 8(%rsi), %rcx
movq %rcx, 8(%rdi)
movq %rax, (%rdi)
movq %rdi, %rax
popq %rbp
retq
.cfi_endproc
.subsections_via_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment