Skip to content

v1.3.0

Choose a tag to compare

@beijixiaohu beijixiaohu released this 29 Dec 10:45
· 17 commits to main since this release
0e02606

性能优化

对 generatePatches 函数进行了重大性能优化,处理大数据集时性能提升约 20 倍。

主要改进

  1. 数组排序优化 (orderUtils.ts)

    • 使用 Map 替代反复的 Array.findIndex 查找,将 O(n²) 降至 O(n)
    • 避免不必要的中间数组创建
  2. Benchmark 重组

    • 升级 vitest 到 v4
    • 重新组织 benchmark 文件结构
  3. Demo 改进

    • 简化 README
    • 更新侧边栏 logo 和布局

性能测试结果

数据规模 优化前 优化后 提升倍数
500 项目 ~250 hz ~5000 hz 20x