Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions benches/new_box_zeroed_with_elems_dynamic_padding.x86-64
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,20 @@ bench_new_box_zeroed_with_elems_dynamic_padding:
push rbx
push rax
mov rbx, rdi
mov ecx, 3
mov rax, rdi
mul rcx
jo .LBB5_6
mov r14, rax
cmp rax, -10
ja .LBB5_6
lea rax, [r14 + 9]
not r14d
and r14d, 3
add r14, rax
setb al
movabs rcx, 9223372036854775803
cmp r14, rcx
seta cl
or cl, al
je .LBB5_4
.LBB5_6:
xor eax, eax
jmp .LBB5_5
.LBB5_4:
movabs rax, 3074457345618258598
cmp rdi, rax
ja .LBB5_1
lea r14, [rbx + 2*rbx]
or r14, 3
add r14, 9
call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
mov esi, 4
mov rdi, r14
call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
.LBB5_5:
jmp .LBB5_3
.LBB5_1:
xor eax, eax
.LBB5_3:
mov rdx, rbx
add rsp, 8
pop rbx
Expand Down
86 changes: 32 additions & 54 deletions benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Iterations: 100
Instructions: 3200
Total Cycles: 2989
Total uOps: 4300
Instructions: 2100
Total Cycles: 2990
Total uOps: 3000

Dispatch Width: 4
uOps Per Cycle: 1.44
IPC: 1.07
Block RThroughput: 10.8
uOps Per Cycle: 1.00
IPC: 0.70
Block RThroughput: 7.5


Instruction Info:
Expand All @@ -22,29 +22,18 @@ Instruction Info:
2 5 1.00 * push rbx
2 5 1.00 * push rax
1 1 0.33 mov rbx, rdi
1 1 0.33 mov ecx, 3
1 1 0.33 mov rax, rdi
2 4 1.00 mul rcx
1 1 1.00 jo .LBB5_6
1 1 0.33 mov r14, rax
1 1 0.33 cmp rax, -10
1 1 1.00 ja .LBB5_6
1 1 0.50 lea rax, [r14 + 9]
1 1 0.33 not r14d
1 1 0.33 and r14d, 3
1 1 0.33 add r14, rax
1 1 0.50 setb al
1 1 0.33 movabs rcx, 9223372036854775803
1 1 0.33 cmp r14, rcx
2 2 1.00 seta cl
1 1 0.33 or cl, al
1 1 1.00 je .LBB5_4
1 0 0.25 xor eax, eax
1 1 1.00 jmp .LBB5_5
1 1 0.33 movabs rax, 3074457345618258598
1 1 0.33 cmp rdi, rax
1 1 1.00 ja .LBB5_1
1 1 0.50 lea r14, [rbx + 2*rbx]
1 1 0.33 or r14, 3
1 1 0.33 add r14, 9
4 7 1.00 * call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
1 1 0.33 mov esi, 4
1 1 0.33 mov rdi, r14
4 7 1.00 * call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
1 1 1.00 jmp .LBB5_3
1 0 0.25 xor eax, eax
1 1 0.33 mov rdx, rbx
1 1 0.33 add rsp, 8
1 6 0.50 * pop rbx
Expand All @@ -65,39 +54,28 @@ Resources:

Resource pressure per iteration:
[0] [1] [2] [3] [4] [5] [6.0] [6.1]
- - 8.99 8.98 5.00 10.03 4.49 4.51
- - 4.49 4.50 5.00 6.01 4.50 4.50

Resource pressure by instruction:
[0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
- - - - 1.00 - 0.49 0.51 push r14
- - - - 1.00 - 0.51 0.49 push rbx
- - - - 1.00 - 0.49 0.51 push rax
- - 0.95 0.04 - 0.01 - - mov rbx, rdi
- - - 0.97 - 0.03 - - mov ecx, 3
- - 0.02 0.02 - 0.96 - - mov rax, rdi
- - 1.00 1.00 - - - - mul rcx
- - - - - 1.00 - - jo .LBB5_6
- - 0.02 0.97 - 0.01 - - mov r14, rax
- - 0.97 0.03 - - - - cmp rax, -10
- - - - - 1.00 - - ja .LBB5_6
- - 0.99 0.01 - - - - lea rax, [r14 + 9]
- - 0.01 0.99 - - - - not r14d
- - 0.97 0.03 - - - - and r14d, 3
- - 0.01 0.98 - 0.01 - - add r14, rax
- - 1.00 - - - - - setb al
- - 0.02 - - 0.98 - - movabs rcx, 9223372036854775803
- - - 0.97 - 0.03 - - cmp r14, rcx
- - 2.00 - - - - - seta cl
- - 0.03 0.03 - 0.94 - - or cl, al
- - - - - 1.00 - - je .LBB5_4
- - - - 1.00 - 0.50 0.50 push r14
- - - - 1.00 - 0.50 0.50 push rbx
- - - - 1.00 - 0.50 0.50 push rax
- - 0.49 0.50 - 0.01 - - mov rbx, rdi
- - 0.50 0.50 - - - - movabs rax, 3074457345618258598
- - 0.50 0.50 - - - - cmp rdi, rax
- - - - - 1.00 - - ja .LBB5_1
- - 0.50 0.50 - - - - lea r14, [rbx + 2*rbx]
- - 0.50 0.50 - - - - or r14, 3
- - 0.50 - - 0.50 - - add r14, 9
- - - - 1.00 1.00 1.00 1.00 call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
- - - 0.50 - 0.50 - - mov esi, 4
- - 0.50 0.50 - - - - mov rdi, r14
- - - - 1.00 1.00 1.00 1.00 call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
- - - - - 1.00 - - jmp .LBB5_3
- - - - - - - - xor eax, eax
- - - - - 1.00 - - jmp .LBB5_5
- - - - 1.00 1.00 1.02 0.98 call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
- - 0.03 0.97 - - - - mov esi, 4
- - 0.96 0.01 - 0.03 - - mov rdi, r14
- - - - 1.00 1.00 0.98 1.02 call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
- - - 0.97 - 0.03 - - mov rdx, rbx
- - 0.01 0.99 - - - - add rsp, 8
- - 0.51 0.49 - - - - mov rdx, rbx
- - 0.49 0.51 - - - - add rsp, 8
- - - - - - 0.50 0.50 pop rbx
- - - - - - 0.50 0.50 pop r14
- - - - - 1.00 - - ret
10 changes: 5 additions & 5 deletions benches/new_box_zeroed_with_elems_dynamic_size.x86-64
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ bench_new_box_zeroed_with_elems_dynamic_size:
push rbx
push rax
mov rbx, rdi
movabs rax, 4611686018427387900
movabs rax, 4611686018427387901
cmp rdi, rax
jbe .LBB5_2
xor eax, eax
jmp .LBB5_3
.LBB5_2:
ja .LBB5_1
lea r14, [2*rbx + 4]
call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
mov esi, 2
mov rdi, r14
call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
jmp .LBB5_3
.LBB5_1:
xor eax, eax
.LBB5_3:
mov rdx, rbx
add rsp, 8
Expand Down
32 changes: 16 additions & 16 deletions benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ Instruction Info:
2 5 1.00 * push rbx
2 5 1.00 * push rax
1 1 0.33 mov rbx, rdi
1 1 0.33 movabs rax, 4611686018427387900
1 1 0.33 movabs rax, 4611686018427387901
1 1 0.33 cmp rdi, rax
1 1 1.00 jbe .LBB5_2
1 0 0.25 xor eax, eax
1 1 1.00 jmp .LBB5_3
1 1 1.00 ja .LBB5_1
1 1 0.50 lea r14, [2*rbx + 4]
4 7 1.00 * call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
1 1 0.33 mov esi, 2
1 1 0.33 mov rdi, r14
4 7 1.00 * call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
1 1 1.00 jmp .LBB5_3
1 0 0.25 xor eax, eax
1 1 0.33 mov rdx, rbx
1 1 0.33 add rsp, 8
1 6 0.50 * pop rbx
Expand All @@ -52,26 +52,26 @@ Resources:

Resource pressure per iteration:
[0] [1] [2] [3] [4] [5] [6.0] [6.1]
- - 3.97 3.97 5.00 5.06 4.50 4.50
- - 3.97 3.98 5.00 5.05 4.50 4.50

Resource pressure by instruction:
[0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
- - - - 1.00 - 0.50 0.50 push r14
- - - - 1.00 - 0.50 0.50 push rbx
- - - - 1.00 - 0.50 0.50 push rax
- - 0.94 0.05 - 0.01 - - mov rbx, rdi
- - 0.05 0.95 - - - - movabs rax, 4611686018427387900
- - 0.95 - - 0.05 - - cmp rdi, rax
- - - - - 1.00 - - jbe .LBB5_2
- - - - - - - - xor eax, eax
- - - - - 1.00 - - jmp .LBB5_3
- - - 1.00 - - - - lea r14, [2*rbx + 4]
- - 0.05 0.94 - 0.01 - - mov rbx, rdi
- - 0.94 0.06 - - - - movabs rax, 4611686018427387901
- - 0.06 0.94 - - - - cmp rdi, rax
- - - - - 1.00 - - ja .LBB5_1
- - 0.94 0.06 - - - - lea r14, [2*rbx + 4]
- - - - 1.00 1.00 1.00 1.00 call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
- - 0.06 0.94 - - - - mov esi, 2
- - 0.94 0.06 - - - - mov rdi, r14
- - 0.98 0.02 - - - - mov esi, 2
- - 0.02 0.94 - 0.04 - - mov rdi, r14
- - - - 1.00 1.00 1.00 1.00 call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
- - 0.05 0.95 - - - - mov rdx, rbx
- - 0.98 0.02 - - - - add rsp, 8
- - - - - 1.00 - - jmp .LBB5_3
- - - - - - - - xor eax, eax
- - 0.94 0.06 - - - - mov rdx, rbx
- - 0.04 0.96 - - - - add rsp, 8
- - - - - - 0.50 0.50 pop rbx
- - - - - - 0.50 0.50 pop r14
- - - - - 1.00 - - ret
62 changes: 29 additions & 33 deletions benches/new_vec_zeroed.x86-64
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
bench_new_vec_zeroed:
mov rax, rdi
movabs rcx, 1537228672809129301
cmp rsi, rcx
ja .LBB5_5
test rsi, rsi
je .LBB5_2
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
movabs r12, 9223372036854775805
mov ecx, 6
mov rax, rsi
mul rcx
jo .LBB5_6
cmp rax, r12
jbe .LBB5_2
.LBB5_6:
add r12, 3
mov qword ptr [rbx], r12
jmp .LBB5_7
.LBB5_2:
mov r14, rsi
test rax, rax
je .LBB5_3
mov r15, rax
lea rcx, [rsi + rsi]
lea rbx, [rcx + 2*rcx]
mov r14, rax
mov r15, rsi
call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL]
mov esi, 2
mov rdi, r15
mov rdi, rbx
call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL]
test rax, rax
jne .LBB5_5
jmp .LBB5_6
.LBB5_3:
mov eax, 2
.LBB5_5:
mov qword ptr [rbx], r14
mov qword ptr [rbx + 8], rax
mov qword ptr [rbx + 16], r14
.LBB5_7:
mov rax, rbx
add rsp, 8
mov rsi, r15
mov rcx, rax
mov rax, r14
test rcx, rcx
pop rbx
pop r12
pop r14
pop r15
je .LBB5_5
mov qword ptr [rax], rsi
mov qword ptr [rax + 8], rcx
mov qword ptr [rax + 16], rsi
ret
.LBB5_5:
movabs rcx, -9223372036854775808
mov qword ptr [rax], rcx
ret
.LBB5_2:
mov ecx, 2
mov qword ptr [rax], rsi
mov qword ptr [rax + 8], rcx
mov qword ptr [rax + 16], rsi
ret
Loading
Loading