repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
string-object-to-string.js
blob
8d866550df94cd23a38ed2aa4b6d636491da70cd
1
const chars = 'abcdefghijklmnopqrstuvwxyz';
2
var prim = '';
3
for (var i = 0; i < 32768; i++) {
4
prim += chars.charAt(~~(Math.random() * 26));
5
}
6
const obj = new String(prim);
7
8
function test(obj)
9
{
10
return obj.toString();
11
}
12
noInline(test);
13
14
for (var i = 0; i < 1e6; ++i)
15
test(obj);