You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varBenchmark=require('benchmark');varsuite=newBenchmark.Suite;vararr1=function(str){return[].slice.apply(str);};varstr2=function(str){return[].slice.call(str);};// 添加测试suite.add('arr1',function(){arr1('test');}).add('str2',function(){str2('test');})// add listeners.on('cycle',function(event){console.log(String(event.target));}).on('complete',function(){console.log('Fastest is '+this.filter('fastest').pluck('name'));})// run async.run({'async': true});
输出结果:
arr1 x 596,505 ops/sec ±1.14% (95 runs sampled)
str2 x 627,822 ops/sec ±1.27% (92 runs sampled)
Fastest is str2
题记
前端开发占位图片
http://via.placeholder.com/350x450
photoshop 激活
AdobePremiereProCC2015
iShadow
http://isx.yt
ScreenToGif
屏幕录制生成gif
下载地址:https://www.screentogif.com/
运行环境:Windows、Unix
everything
下载地址:https://www.voidtools.com/zh-cn/
Windows系统全局快速搜索文件,超级快的那种
运行环境:Windows
lighthouse
测试页面的性能,给出优化建议
有Google 插件,也有命令行工具(GitHub或者npmjs都有)
运行环境:Linux、Chrome
Draw.io Integration
画图软件(VSCode插件)
运行环境:Visual Studio Code
使用方法:新建一个demo.drawio,然后通过VSCode打开。
7-Zip https://sparanoid.com/lab/7z/
Geek Uninstaller https://geekuninstaller.com/
Microsoft Edge https://www.microsoft.com/en-us/edge
PotPlayer https://potplayer.daum.net/?lang=zh_CN
IDM http://www.internetdownloadmanager.com/
Clover http://cn.ejie.me/
QuickLook Windows商店搜索即可
Notepads Windows商店搜索即可
CCleaner https://www.ccleaner.com/
Wox https://github.com/Wox-launcher/Wox/releases
Everything https://www.voidtools.com/zh-cn/
benchmark.js 测试我们js代码的性能
源码地址
使用示例(我们用此工具来测试一下
call
和apply
的性能差别):输出结果:
有一个网站是基于此工具做的,这使我们可以在线使用该工具,网站地址:
https://jsperf.com/
(貌似打不开了)The text was updated successfully, but these errors were encountered: