Skip to content
Closed
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
7 changes: 7 additions & 0 deletions zerocopy/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ you **MUST** also read [agent_docs/reviewing.md](./agent_docs/reviewing.md).
- **Documentation:** **DO** ensure that changes do not cause documentation to
become out of date (e.g., renaming files referenced here).

- **Derived traits in tests:** For traits whose documentation requires
derive-only implementation, test fixture types **MUST** use Zerocopy's
derives. Do not bypass a derive rejection with a manual implementation;
instead, test the lower-level internal primitive or extend the derive.
Generated derive-output snapshots and crate-owned built-in implementations
are exempt.

## Project Context

### Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
bench_split_via_runtime_check_dynamic_padding:
mov rax, rdi
mov rdx, qword ptr [rsi + 16]
mov ecx, edx
and ecx, 3
cmp ecx, 1
lea rdi, [rdx + 2*rdx]
mov ecx, edi
not ecx
test cl, 3
jne .LBB5_1
mov rcx, qword ptr [rsi]
mov rsi, qword ptr [rsi + 8]
lea rdi, [rdx + 2*rdx]
add rdi, rcx
add rdi, 9
sub rsi, rdx
Expand Down
34 changes: 17 additions & 17 deletions zerocopy/benches/split_via_runtime_check_dynamic_padding.x86-64.mca
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Iterations: 100
Instructions: 2000
Total Cycles: 708
Total Cycles: 807
Total uOps: 2000

Dispatch Width: 4
uOps Per Cycle: 2.82
IPC: 2.82
uOps Per Cycle: 2.48
IPC: 2.48
Block RThroughput: 5.0


Expand All @@ -20,13 +20,13 @@ Instruction Info:
[1] [2] [3] [4] [5] [6] Instructions:
1 1 0.33 mov rax, rdi
1 5 0.50 * mov rdx, qword ptr [rsi + 16]
1 1 0.33 mov ecx, edx
1 1 0.33 and ecx, 3
1 1 0.33 cmp ecx, 1
1 1 0.50 lea rdi, [rdx + 2*rdx]
1 1 0.33 mov ecx, edi
1 1 0.33 not ecx
1 1 0.33 test cl, 3
1 1 1.00 jne .LBB5_1
1 5 0.50 * mov rcx, qword ptr [rsi]
1 5 0.50 * mov rsi, qword ptr [rsi + 8]
1 1 0.50 lea rdi, [rdx + 2*rdx]
1 1 0.33 add rdi, rcx
1 1 0.33 add rdi, 9
1 1 0.33 sub rsi, rdx
Expand All @@ -53,26 +53,26 @@ Resources:

Resource pressure per iteration:
[0] [1] [2] [3] [4] [5] [6.0] [6.1]
- - 3.00 3.02 5.00 4.98 4.00 4.00
- - 3.01 3.01 5.00 4.98 4.00 4.00

Resource pressure by instruction:
[0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
- - - 0.99 - 0.01 - - mov rax, rdi
- - - - - - - 1.00 mov rdx, qword ptr [rsi + 16]
- - 0.99 0.01 - - - - mov ecx, edx
- - 0.99 0.01 - - - - and ecx, 3
- - 0.97 0.03 - - - - cmp ecx, 1
- - 0.02 0.01 - 0.97 - - mov rax, rdi
- - - - - - 0.99 0.01 mov rdx, qword ptr [rsi + 16]
- - 0.02 0.98 - - - - lea rdi, [rdx + 2*rdx]
- - 0.98 0.02 - - - - mov ecx, edi
- - 0.98 0.01 - 0.01 - - not ecx
- - 0.97 0.02 - 0.01 - - test cl, 3
- - - - - 1.00 - - jne .LBB5_1
- - - - - - 1.00 - mov rcx, qword ptr [rsi]
- - - - - - 0.99 0.01 mov rsi, qword ptr [rsi + 8]
- - 0.01 0.99 - - - - lea rdi, [rdx + 2*rdx]
- - - 0.96 - 0.04 - - add rdi, rcx
- - 0.03 - - 0.97 - - add rdi, 9
- - 0.02 0.98 - - - - add rdi, rcx
- - 0.01 0.96 - 0.03 - - add rdi, 9
- - 0.01 0.03 - 0.96 - - sub rsi, rdx
- - - - 1.00 - 1.00 - mov qword ptr [rax + 8], rdx
- - - - 1.00 - - 1.00 mov qword ptr [rax + 16], rdi
- - - - 1.00 - 0.01 0.99 mov qword ptr [rax + 24], rsi
- - - - 1.00 - 0.99 0.01 mov qword ptr [rax], rcx
- - - - 1.00 - - 1.00 mov qword ptr [rax], rcx
- - - - - 1.00 - - ret
- - - - - - - - xor ecx, ecx
- - - - 1.00 - 0.01 0.99 mov qword ptr [rax], rcx
Expand Down
Loading
Loading