摘要: 测试结果:用typeof性能要高于instanceof,约为20+倍。var count = 10000000;var func = function () {};var startTime = new Date();console.log(typeof func === "function");for (var j = 0; j < count; j++){ typeof func === "function";}console.log('[typeof func === "function"] ' + (ne 阅读全文
posted @ 2012-04-01 10:34 BlackTea 阅读(820) 评论(0) 推荐(0)