Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
poolman
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Lindgren
poolman
Commits
83868d29
Commit
83868d29
authored
4 years ago
by
Per Lindgren
Browse files
Options
Downloads
Patches
Plain Diff
pool benchmark
parent
a2ed7beb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmark/README.md
+54
-0
54 additions, 0 deletions
benchmark/README.md
with
54 additions
and
0 deletions
benchmark/README.md
0 → 100644
+
54
−
0
View file @
83868d29
# Benchmark
Here we focus on the allocation and deallocation.
```
Rust
mod app {
pub const U: usize = 2;
pub static P: PoolMan<u32, U> = PoolMan::new([0; U]);
...
}
use poolman::{Poolman, Box, Error};
#[inline(never)]
fn just_alloc() -> Result<Box<u32, { app::U }>, Error> {
app::P.alloc()
}
```
```
arm
08000256 <poolman::just_alloc>:
8000256: b580 push {r7, lr}
8000258: 466f mov r7, sp
800025a: f240 0200 movw r2, #0
800025e: f2c2 0200 movt r2, #8192 ; 0x2000
8000262: f892 1028 ldrb.w r1, [r2, #40] ; 0x28
8000266: b171 cbz r1, 8000286 <poolman::just_alloc+0x30>
8000268: f3ef 8c10 mrs ip, PRIMASK
800026c: b672 cpsid i
800026e: 6a53 ldr r3, [r2, #36] ; 0x24
8000270: f00c 0c01 and.w ip, ip, #1
8000274: eb02 0183 add.w r1, r2, r3, lsl #2
8000278: 69c9 ldr r1, [r1, #28]
800027a: 6251 str r1, [r2, #36] ; 0x24
800027c: 2903 cmp r1, #3
800027e: d305 bcc.n 800028c <poolman::just_alloc+0x36>
8000280: 2201 movs r2, #1
8000282: 7042 strb r2, [r0, #1]
8000284: e007 b.n 8000296 <poolman::just_alloc+0x40>
8000286: 2101 movs r1, #1
8000288: 8001 strh r1, [r0, #0]
800028a: bd80 pop {r7, pc}
800028c: f102 0114 add.w r1, r2, #20
8000290: 2200 movs r2, #0
8000292: e9c0 3101 strd r3, r1, [r0, #4]
8000296: f1bc 0f00 cmp.w ip, #0
800029a: 7002 strb r2, [r0, #0]
800029c: bf18 it ne
800029e: bd80 popne {r7, pc}
80002a0: b662 cpsie i
80002a2: bd80 pop {r7, pc}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment