V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
Kaciras
V2EX  ›  分享创造

写了一个 JS Benchmark 工具

  •  
  •   Kaciras ·
    Kaciras · 15 天前 · 1032 次点击

    JS 人测 Benchmark 的多吗?我是挺爱写这玩意的。考虑到现有的库功能都不太够于是自己搞了一个。

    https://github.com/ESBenchmark/ESBench

    开发思路

    • 核心功能是跨 Runtime 运行,一套代码同时泡在浏览器、Node 、bun 等等。
    • 其它包括参数、基线、生成图表、统计指标等等,我见过的功能都实现了。
    • 带一个 Playground 可以在线运行。
    • 文档完善,示例丰富,还做了 IDE 插件 跟单测一样点一下即运行。

    其实测一下性能也能发现一些有趣的事情,比如原生的 Array.sort 性能不如自己写的快排

    2 条回复
    wushenlun
        1
    wushenlun  
       15 天前 via Android
    我用 python aiosync ,按道理 nodejs 原生性能更好
    Kaciras
        2
    Kaciras  
    OP
       15 天前
    @wushenlun 正好可以跑一跑比较下。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2894 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 12:34 · PVG 20:34 · LAX 05:34 · JFK 08:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.