Files
Neo-ZQYY/_DEL/miniprogram-dev/03-reference/benchmark-history.md
2026-03-15 10:15:02 +08:00

38 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 基准测试历史记录
> 本文件记录 H5→MP 迁移项目的 Benchmark 基准测试历史,仅供参考。
> 完整推导过程见 `docs/miniprogram-dev/03-reference/benchmark-history.md`(本文件即为迁移后的版本,原 `docs/h5_ui/compare/HISTORY.md` 已归档)。
---
## 当前有效参数v3
| 参数 | H5 | MP | 说明 |
|------|-----|-----|------|
| viewport | 430×752 | 430×752 | 统一视口 |
| DPR | 1.5 | 1.5 | 双端一致 |
| 输出尺寸 | 645×1128 | 645×1128 | 零缩放 |
| rpx 系数 | — | 1:1.75 | `rpx = px × 2 × 0.875` |
## v3 基准测试结果2026-03-11
| 组 | 差异率 | 说明 |
|---|---|---|
| g1裁剪后 | 3.87% | 全部来自不可消除的系统性因素 |
差异来源:字体渲染 ~2% + 行内元素高度 ~1% + rpx 取偶 ~0.5% + 抗锯齿 ~0.5%
## 版本演进
| 版本 | 日期 | rpx 系数 | 状态 |
|------|------|---------|------|
| v2 | 2026-03-10 | 1:1.82750/412 | ❌ 废弃视口不一致、有损缩放、DPR 不对等) |
| v3 | 2026-03-11 | 1:1.75750/430 工程近似) | ✅ 当前有效 |
## 结论
1. `rpx = px × 2 × 0.875`1:1.75)是正确的迁移换算公式
2. 双端截图参数必须统一viewport=430×752, DPR=1.5
3. 像素对比的背景噪音基线约 3.87%
4. <5% 通过目标在基线之上仅有 ~1% 修正空间,公式和参数已高度准确