• [Javascrip] Logging Timing Data to the Console


    Learn to use console.time with console.timeEnd to get accurate timings of operations in javascript. This tool can help with javascript profiling and performance optimization, and knowing how to use the console to do it means you don't have to pollute your codebase with timers and placeholders.

    console.time("key");
    var array =  [];
    for(var i = 0; i <  1000000; i++){
        array.push({index: i});
    }
    console.timeEnd("key");

  • 相关阅读:
    歌词:青春
    转载:只输了五元钱
    极静之渊

    低学翁
    心灵死化,何时巨变?
    无题

    意念
    爱之切
  • 原文地址:https://www.cnblogs.com/Answer1215/p/5503205.html
Copyright © 2020-2023  润新知