Add bench script; Remove bench data
This commit is contained in:
parent
95c811f3b5
commit
67fa4fc9ce
@ -1,5 +0,0 @@
|
|||||||
var i = 0;
|
|
||||||
|
|
||||||
while (i < 1_000_000_000) {
|
|
||||||
i++;
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
let mut i = 0
|
let mut i = 0
|
||||||
|
|
||||||
while i < 100_000_000 {
|
while i < 1_000_000 {
|
||||||
i += 1
|
i += 1
|
||||||
}
|
}
|
5
bench/assets/count_to_one_million.js
Normal file
5
bench/assets/count_to_one_million.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
var i = 0;
|
||||||
|
|
||||||
|
while (i < 1_000_000) {
|
||||||
|
i++;
|
||||||
|
}
|
4
bench/assets/count_to_one_million.py
Normal file
4
bench/assets/count_to_one_million.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
i = 1
|
||||||
|
|
||||||
|
while i < 1_000_000:
|
||||||
|
i += 1
|
7
bench/count_one_one_million.sh
Normal file
7
bench/count_one_one_million.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
hyperfine \
|
||||||
|
--shell none \
|
||||||
|
--warmup 5 \
|
||||||
|
'../target/release/dust assets/count_to_one_million.ds' \
|
||||||
|
'node assets/count_to_one_million.js' \
|
||||||
|
'deno assets/count_to_one_million.js' \
|
||||||
|
'python assets/count_to_one_million.py'
|
@ -89,7 +89,7 @@ impl Chunk {
|
|||||||
.rev()
|
.rev()
|
||||||
.find_map(|(instruction, _)| {
|
.find_map(|(instruction, _)| {
|
||||||
if instruction.yields_value() {
|
if instruction.yields_value() {
|
||||||
Some(instruction.a() as usize)
|
Some(instruction.a() as usize + 1)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
491
flamegraph.svg
491
flamegraph.svg
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 23 KiB |
@ -1,22 +0,0 @@
|
|||||||
# started on Tue Dec 3 23:57:01 2024
|
|
||||||
|
|
||||||
|
|
||||||
Performance counter stats for 'target/release/dust bench/assets/count_to_one_billion.ds':
|
|
||||||
|
|
||||||
3,821.33 msec task-clock:u # 1.000 CPUs utilized
|
|
||||||
0 context-switches:u # 0.000 /sec
|
|
||||||
0 cpu-migrations:u # 0.000 /sec
|
|
||||||
128 page-faults:u # 33.496 /sec
|
|
||||||
19,568,365,731 cycles:u # 5.121 GHz
|
|
||||||
22,811,191 stalled-cycles-frontend:u # 0.12% frontend cycles idle
|
|
||||||
70,300,518,284 instructions:u # 3.59 insn per cycle
|
|
||||||
# 0.00 stalled cycles per insn
|
|
||||||
12,500,111,636 branches:u # 3.271 G/sec
|
|
||||||
19,795 branch-misses:u # 0.00% of all branches
|
|
||||||
|
|
||||||
3.822391878 seconds time elapsed
|
|
||||||
|
|
||||||
3.811230000 seconds user
|
|
||||||
0.000999000 seconds sys
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user