-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
49 lines (48 loc) · 1.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<title>Eruda-benchmark</title>
</head>
<body>
<script src="node_modules/eruda/eruda.js"></script>
<script>
eruda.init({ tool: [] })
</script>
<script src="assets/eruda-benchmark.js"></script>
<script>
eruda.add(erudaBenchmark).show('benchmark').show()
</script>
<script>
var benchmark = eruda.get('benchmark')
benchmark.add('Test', function () {
var arr = new Array(10000)
for (var i = 0; i < 10000; i++) arr[i] = i * 2
})
benchmark.add('Test Suite', [
{
name: 'RegExp#test',
fn: function () {
;/o/.test('Hello World!')
},
},
{
name: 'String#indexOf',
fn: function () {
'Hello World!'.indexOf('o') > -1
},
},
{
name: 'String#match',
fn: function () {
!!'Hello World!'.match(/o/)
},
},
])
</script>
</body>
</html>