Skip to content

Commit 5d1cb31

Browse files
committed
Add benchmark for temporary object creation
1 parent 7c10074 commit 5d1cb31

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(() => {
2+
let sum = '';
3+
let string = "Hello, world!!!";
4+
for (let i = 0; i < string.length; ++i) {
5+
sum += string.charCodeAt(i).toString(16);
6+
}
7+
return sum;
8+
})();

core/engine/benches/full.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ macro_rules! full_benchmarks {
9595
}
9696

9797
full_benchmarks!(
98+
{"String Code Point Sum", string_code_point_sum},
9899
{"Symbols", symbol_creation},
99100
{"For loop", for_loop},
100101
{"Fibonacci", fibonacci},

0 commit comments

Comments
 (0)