Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34366 > unrolled thread

console.time()

Started by"Evertjan." <exxjxw.hannivoort@inter.nl.net>
First post2017-11-16 11:07 +0100
Last post2017-11-16 11:07 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript


Contents

  console.time() "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-11-16 11:07 +0100

#34366 — console.time()

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2017-11-16 11:07 +0100
Subjectconsole.time()
Message-ID<XnsA82F713F21985eejj99@194.109.6.166>
Why this ultra long "timing total"??
[in Chrome 63.0 beta (64-bit)]

<script>
'use strict';

let q = 0, r = 0;

console.time("timing total");

console.time("timing 1");
for (let x=0;x<100000;x++) {q++};
console.timeEnd("timing 1");

console.time("timing 2");
for (let x=0;x<100000;x++) {r++};
console.timeEnd("timing 2");

console.timeEnd("timing total");

console.time("timing total 2");
console.time("timing empty");
console.timeEnd("timing empty");
console.timeEnd("timing total 2");


// console:

// timing 1: 1.126953125ms
// timing 2: 1.0810546875ms
// timing total: 4.2509765625ms

// timing empty: 0.0009765625ms
// timing total 2: 0.09375ms

</script>

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web