maokai 最近的时间轴更新
maokai

maokai

V2EX 第 536499 号会员,加入于 2021-03-08 05:09:30 +08:00
根据 maokai 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
maokai 最近回复了
2022-03-04 15:28:07 +08:00
回复了 huangya 创建的主题 Windows hyper-v 装 Linux 的图形界面卡顿问题
刚刚试了下,Ubuntu 22.04 里面可以 blacklist hyperv_fb 并且启用 hyperv_drm ,结合 Wayland 挺流畅的。
2022-02-16 00:20:14 +08:00
回复了 brendanliu 创建的主题 优惠信息 dell u2723qe/qx 已可购买
2021-11-03 09:40:29 +08:00
回复了 maokai 创建的主题 问与答 最近 Windows 每天都会报文件系统损坏错误……
@loading 不是,只用了 npm 和 yarn ,连接到国外的源
2021-07-16 21:06:28 +08:00
回复了 kebyn 创建的主题 Node.js callback 和 promise 性能差距疑问
哦,对了,你需要把两个 util.promisify 拿到 list_dir 外面来,这样测出的结果差距就小一些了:

❯ time node /tmp/promise.js && sleep 1 && time node /tmp/callback.js
node /tmp/promise.js 0.45s user 0.75s system 142% cpu 0.837 total
node /tmp/callback.js 0.58s user 0.99s system 196% cpu 0.800 total
❯ time node /tmp/promise.js && sleep 1 && time node /tmp/callback.js
node /tmp/promise.js 0.53s user 0.98s system 175% cpu 0.855 total
node /tmp/callback.js 0.38s user 1.00s system 173% cpu 0.794 total
❯ time node /tmp/promise.js && sleep 1 && time node /tmp/callback.js
node /tmp/promise.js 0.55s user 0.98s system 183% cpu 0.835 total
node /tmp/callback.js 0.52s user 0.86s system 173% cpu 0.797 total

❯ time node /tmp/callback.js && sleep 1 && time node /tmp/promise.js
node /tmp/callback.js 0.48s user 0.90s system 173% cpu 0.801 total
node /tmp/promise.js 0.63s user 1.02s system 192% cpu 0.857 total
❯ time node /tmp/callback.js && sleep 1 && time node /tmp/promise.js
node /tmp/callback.js 0.41s user 0.98s system 172% cpu 0.807 total
node /tmp/promise.js 0.59s user 0.89s system 172% cpu 0.857 total
❯ time node /tmp/callback.js && sleep 1 && time node /tmp/promise.js
node /tmp/callback.js 0.42s user 1.05s system 184% cpu 0.798 total
node /tmp/promise.js 0.56s user 0.95s system 177% cpu 0.848 total
2021-07-16 20:48:19 +08:00
回复了 kebyn 创建的主题 Node.js callback 和 promise 性能差距疑问
❯ node --version
v14.17.3

❯ time node /tmp/promise.js && time node /tmp/callback.js
node /tmp/promise.js 0.66s user 0.84s system 169% cpu 0.887 total
node /tmp/callback.js 0.42s user 1.13s system 192% cpu 0.806 total
❯ time node /tmp/promise.js && time node /tmp/callback.js
node /tmp/promise.js 0.61s user 0.92s system 169% cpu 0.899 total
node /tmp/callback.js 0.41s user 0.84s system 156% cpu 0.804 total
❯ time node /tmp/promise.js && time node /tmp/callback.js
node /tmp/promise.js 0.46s user 1.03s system 168% cpu 0.886 total
node /tmp/callback.js 0.30s user 0.76s system 134% cpu 0.783 total

❯ time node /tmp/callback.js&& time node /tmp/promise.js
node /tmp/callback.js 0.44s user 0.81s system 160% cpu 0.772 total
node /tmp/promise.js 0.64s user 0.89s system 170% cpu 0.898 total
❯ time node /tmp/callback.js&& time node /tmp/promise.js
node /tmp/callback.js 0.39s user 0.87s system 163% cpu 0.776 total
node /tmp/promise.js 0.58s user 0.92s system 168% cpu 0.885 total
❯ time node /tmp/callback.js&& time node /tmp/promise.js
node /tmp/callback.js 0.36s user 0.93s system 166% cpu 0.777 total
node /tmp/promise.js 0.61s user 0.90s system 170% cpu 0.884 total
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4412 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 09:55 · PVG 17:55 · LAX 01:55 · JFK 04:55
Developed with CodeLauncher
♥ Do have faith in what you're doing.