blob: 0e8d2b737bac9907c0bb7d828c913741de818829 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<html>
<head>
<script>
function fib(n) {
return n < 2 ? 1 : fib(n - 1) + fib(n - 2);
}
function eternal_fib() {
console.profile();
for (var i = 0; i < 50; ++i) {
fib(20);
}
console.profileEnd();
}
function load() {
// Let the page do initial rendering, then go.
setTimeout(eternal_fib, 200);
}
</script>
</head>
<body onload="load()">
</body>
</html>
|