data: A3 提效对比实验数据(23 样例 + 人工基线 + 插件实测,整体提速约 266 倍)

- data/efficiency-samples/ 23 个多语言样例 + data/manual-review-tool.html 人工审核工具
- tests/measure/measure-plugin-samples.mjs 四语言插件侧测量脚本
- tests/measure/compare-a3.mjs 聚合对比 + results(插件实测/人工基线/comparison)
- performance-comparison.md 填实基线对比与结论;README 效果总结由占位改为真实数据
This commit is contained in:
范智鹏
2026-08-27 22:54:07 +08:00
parent e469554691
commit 3280836124
33 changed files with 3710 additions and 36 deletions
+39
View File
@@ -0,0 +1,39 @@
// sample-6: coupon service module
var config = { retries: 3 };
function couponProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function couponValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function couponUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { couponProcess, couponValidate, couponUnsafe, config };