mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
chore: 全量基准重锚(迭代器关闭与字符串替换路径分配变化)
This commit is contained in:
+78
-105
@@ -1,106 +1,79 @@
|
||||
Test Name Wall(ms) Comp(ms) Exec(ms) Instrs GC Ct IC Rate Sess Objs Sess B Peak B Ret B
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
arith_ops 357.21 0.359 356.850 4700023 0 0.0% 0 0 0 0
|
||||
array_filter 629.60 0.427 629.173 55739 0 99.9% 208001 28479960 28479960 3416
|
||||
array_for_each 657.85 0.370 657.476 35737 0 99.9% 204001 27887960 27887960 1184
|
||||
array_index_get 152.73 0.278 152.456 1817037 0 99.9% 1 38160 38160 8352
|
||||
array_index_set 123.65 0.328 123.324 1517035 0 99.9% 1 38160 38160 8352
|
||||
array_join 580.46 0.380 580.078 4140029 0 100.0% 20000 12580000 12580000 339
|
||||
array_literal 111.84 0.333 111.504 1500025 0 0.0% 50000 9200000 9200000 184
|
||||
array_map 626.15 0.476 625.677 55739 0 99.9% 208001 30079960 30079960 4568
|
||||
array_push_pop 1411.40 0.339 1411.065 10200029 0 100.0% 50000 28900000 28900000 552
|
||||
array_reduce 632.20 0.377 631.827 57739 0 99.9% 204001 27887960 27887960 2384
|
||||
array_slice 80.92 0.320 80.603 79739 0 99.9% 6001 13689960 13689960 4568
|
||||
array_sort 137.39 0.430 136.957 17939 0 99.7% 51501 9168960 9168960 4568
|
||||
branch_if 189.64 0.267 189.375 2816690 0 0.0% 0 0 0 0
|
||||
branch_switch 188.16 0.369 187.788 3000023 0 0.0% 0 0 0 0
|
||||
call_args 108.36 0.469 107.891 880029 0 0.0% 20002 2720307 2720307 715
|
||||
call_closure 75.95 0.341 75.609 500044 0 0.0% 20005 2720749 2720749 1461
|
||||
call_method 90.61 0.383 90.225 580032 0 50.0% 20003 2720443 2720443 907
|
||||
call_new_proto 147.95 0.348 147.598 800037 0 33.3% 60004 8160614 8160614 1694
|
||||
call_recursion 1115.73 0.407 1115.319 5724629 2 0.0% 147881 20112435 33554499 715
|
||||
call_this 138.66 0.318 138.340 780034 0 50.0% 40005 5440760 5440760 1632
|
||||
cmp_ops 502.75 0.247 502.498 5800025 0 0.0% 0 0 0 0
|
||||
code_forge 797.18 0.238 796.939 110018 0 0.0% 10000 1651670 1651670 0
|
||||
coercion_boolean 317.18 0.229 316.953 4450023 0 0.0% 0 0 0 0
|
||||
coercion_concat 224.14 0.362 223.781 2300025 0 0.0% 0 3888890 3888890 39
|
||||
coercion_nullish 448.94 0.348 448.587 5100032 0 50.0% 1 136 192 192
|
||||
coercion_tonumber 172.00 0.342 171.663 2600023 0 0.0% 0 0 0 0
|
||||
coercion_toprimitive 182.83 0.504 182.327 500025 0 0.0% 120000 17900000 17900000 1815
|
||||
coercion_tostring 406.19 0.343 405.842 4600025 0 0.0% 0 4700036 4700036 83
|
||||
gc_array 642.38 0.276 642.107 4390027 0 100.0% 5000 10300000 10300000 672
|
||||
gc_object 140.58 0.242 140.341 1550025 0 100.0% 50000 6800000 6800000 192
|
||||
gc_string 44.49 0.201 44.287 460025 0 0.0% 0 788890 788890 40
|
||||
gc_string_long 2310.55 0.205 2310.343 23000025 2 0.0% 0 7334531 33554441 41
|
||||
ic_cache 62.73 0.444 62.280 574039 0 78.9% 10001 1740160 2051232 2051232
|
||||
ic_polymorphic 287.28 0.386 286.891 4033387 0 100.0% 3 408 576 576
|
||||
loop_do_while 278.84 0.255 278.587 3000019 0 0.0% 0 0 0 0
|
||||
loop_for 1409.51 0.279 1409.235 16000023 0 0.0% 0 0 0 0
|
||||
loop_for_in 719.20 0.544 718.652 7591739 0 0.0% 1 3626 3626 1184
|
||||
loop_for_of 291.23 0.441 290.788 3652739 0 99.0% 6001 927960 927960 1184
|
||||
loop_for_of_string 223.25 0.309 222.940 2726339 0 0.0% 3000 466150 466150 132
|
||||
loop_index 508.16 0.483 507.679 6367739 0 99.0% 1 3960 3960 1184
|
||||
loop_while 1430.74 0.320 1430.415 16000023 0 0.0% 0 0 0 0
|
||||
loop_while_index 513.57 0.671 512.895 6667739 0 99.0% 1 3960 3960 1184
|
||||
map_ops 973.67 0.496 973.169 12650027 0 100.0% 100000 17200000 17200000 816
|
||||
math_ops 566.25 0.411 565.840 6500023 0 0.0% 0 0 0 0
|
||||
mem_array_grow 453.63 0.333 453.293 3800024 0 0.0% 1 160 2097312 2097312
|
||||
mem_closure_chain 138.85 0.807 138.041 590034 0 0.0% 80000 12558890 12558890 10079778
|
||||
mem_cross_call_retain 272.82 0.406 272.416 1590032 0 25.0% 60004 11970749 11970749 8693357
|
||||
mem_map_retain 63.59 0.302 63.289 600021 0 100.0% 20002 4698124 7063172 7063172
|
||||
mem_object_graph 126.93 0.385 126.543 901110 0 0.0% 65536 8912936 8912936 6291984
|
||||
mem_set_retain 48.50 0.287 48.211 460021 0 100.0% 20002 3809234 5158474 5158474
|
||||
mem_string_accum 121.77 0.292 121.480 960020 0 0.0% 1 2744633 3268921 3268921
|
||||
mem_string_rope 2.52 0.184 2.330 16025 6 0.0% 0 124184000 124184000 124184000
|
||||
member_compound 374.26 0.357 373.906 4400076 0 100.0% 6 872 1152 1152
|
||||
object_keys 534.94 0.408 534.528 3740027 0 0.0% 20000 18360000 18360000 416
|
||||
prop_access 212.38 0.259 212.123 2800036 0 100.0% 1 136 192 192
|
||||
prop_bracket 191.97 0.282 191.689 2100036 0 100.0% 1 136 192 192
|
||||
prop_delete 65.67 0.349 65.320 480034 0 50.0% 1 136 192 192
|
||||
prop_dynamic 94.31 0.306 94.001 1100028 0 100.0% 1 136 192 192
|
||||
prop_nested 150.21 0.407 149.804 1550025 0 100.0% 150000 20400000 20400000 576
|
||||
prop_set 255.11 0.338 254.767 3200032 0 100.0% 1 136 192 192
|
||||
property 154.61 0.485 154.129 111035 0 0.0% 1 231916 231916 32928
|
||||
set_ops 822.22 0.300 821.922 9950027 0 90.9% 100000 17200000 17200000 320
|
||||
string_build 1918.08 0.465 1917.611 16560027 4 0.0% 0 6791197 33554520 122
|
||||
string_case 191.25 0.267 190.979 1600028 0 0.0% 0 7600000 7600000 0
|
||||
string_char 349.03 0.268 348.762 3800025 0 0.0% 0 0 0 0
|
||||
string_concat 200.08 0.372 199.711 1800031 0 0.0% 0 1900000 1900000 38
|
||||
string_indexof 102.94 0.242 102.695 1100028 0 0.0% 0 0 0 0
|
||||
string_length 479.71 0.492 479.220 6361939 0 99.0% 1 7750 7750 4974
|
||||
string_replace 61.38 0.311 61.069 600030 0 0.0% 0 1320000 1320000 66
|
||||
string_replace_fn 716.52 0.379 716.138 64987 3 0.0% 210 17604583 33586009 12641
|
||||
string_split 108.00 0.369 107.625 540030 0 0.0% 20000 24520000 24520000 1226
|
||||
string_substring 138.24 0.292 137.949 1500030 0 0.0% 0 2150000 2150000 43
|
||||
string_trim 46.15 0.331 45.820 460028 0 0.0% 0 1560000 1560000 0
|
||||
try_catch_ok 73.27 0.350 72.914 1050023 0 0.0% 0 0 0 0
|
||||
try_catch_throw 58.82 0.331 58.485 580023 0 0.0% 20000 3440000 3440000 0
|
||||
typeof_ops 317.32 0.297 317.018 4300023 0 0.0% 100000 13600000 13600000 0
|
||||
unary_ops 322.18 0.367 321.810 3700023 0 0.0% 0 0 0 0
|
||||
|
||||
内存基准用例(mem_*):
|
||||
|
||||
mem_object_graph 大型对象图留存:15 层满二叉树 32767 节点整体驻留 session 堆
|
||||
mem_string_accum 字符串累积留存:40000 个互不相同的字符串驻留数组(interner 压力)
|
||||
mem_closure_chain 闭包/upvalue 长链:10000 层闭包各自捕获前层闭包与 payload 驻留
|
||||
mem_array_grow 数组增缩容量:扩到 200000 元素后截回 1000,观测元素向量容量是否回落(账目按 Vec capacity 计)
|
||||
mem_cross_call_retain 跨调用长存活数据:全局 store 经 30000 次调用累积 30000 条记录
|
||||
mem_map_retain 原生盒边持有:Map 持 20000 组字符串键 + 对象值
|
||||
mem_set_retain 原生盒边持有:Set 持 20000 个对象(各带 payload 字符串)
|
||||
mem_string_rope 拼接 rope 链留存:重复二元拼接形成深 Cons 链(账目按逻辑长度计,数值高于实际足迹)
|
||||
口径:Peak B/Ret B 为 session 堆账目(对象头 + 堆数据 + 存活串);BigInt 不入
|
||||
该账目,由单 run 分配公式按表长单列。epoch arena 的临时驻留不计入字节账目
|
||||
(数量列恒零)。Peak B 为顶层指令边界采样的 session 堆账目高水位;单指令内瞬态
|
||||
与 epoch 高水位不计。Ret B 为 workload 后晋升 + 完整 GC 的真存活集,至多含一份
|
||||
引擎内部副本:逃逸屏障留 epoch 原件且顶层寄存器根不回写时,测量时晋升会把原件
|
||||
再克隆一份(object_graph 见留存锚测试)。
|
||||
|
||||
A/B 判据口径:
|
||||
|
||||
主判(回归门):确定性列——指令数、内存账目(session/peak/retained)、
|
||||
垃圾回收计数、内联缓存计数——跨运行逐字节一致,零容差,双向任何变化即信号;
|
||||
基线对比的退出码 1 只认这些列。
|
||||
次判(墙时间):wall/exec/compile/gc_collection 列在 ±5% 带内(固定核、
|
||||
warmup 2、三轮中位);基线对比容差 0.50,信息性,不影响退出码。
|
||||
基线文件是陈旧锚(安静树单次快照),不是 A/B 仪器;A/B 是同机同宿主
|
||||
严格交错对比。
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
arith_ops 398.69 0.386 398.308 4700023 0 0.0% 0 0 0 0
|
||||
array_filter 709.97 0.351 709.613 55739 0 99.9% 208001 28479960 28479960 3416
|
||||
array_for_each 715.62 0.326 715.298 35737 0 99.9% 204001 27887960 27887960 1184
|
||||
array_index_get 160.87 0.267 160.604 1817037 0 99.9% 1 38160 38160 8352
|
||||
array_index_set 130.48 0.253 130.224 1517035 0 99.9% 1 38160 38160 8352
|
||||
array_join 620.96 0.284 620.675 4140029 0 100.0% 20000 12580000 12580000 339
|
||||
array_literal 117.99 0.222 117.771 1500025 0 0.0% 50000 9200000 9200000 184
|
||||
array_map 691.23 0.332 690.896 55739 0 99.9% 208001 30079960 30079960 4568
|
||||
array_push_pop 1510.54 0.283 1510.251 10200029 0 100.0% 50000 28900000 28900000 552
|
||||
array_reduce 704.11 0.383 703.730 57739 0 99.9% 204001 27887960 27887960 2384
|
||||
array_slice 94.33 0.337 93.997 79739 0 99.9% 6001 13689960 13689960 4568
|
||||
array_sort 155.79 0.390 155.403 17939 0 99.7% 51501 9168960 9168960 4568
|
||||
branch_if 199.96 0.261 199.694 2816690 0 0.0% 0 0 0 0
|
||||
branch_switch 198.70 0.281 198.419 3000023 0 0.0% 0 0 0 0
|
||||
call_args 119.50 0.330 119.170 880029 0 0.0% 20002 2720307 2720307 715
|
||||
call_closure 83.44 0.279 83.162 500044 0 0.0% 20005 2720749 2720749 1461
|
||||
call_method 96.34 0.254 96.089 580033 0 50.0% 20003 2720443 2720443 907
|
||||
call_new_proto 164.70 0.295 164.404 800037 0 33.3% 60004 8160614 8160614 1694
|
||||
call_recursion 1222.84 0.340 1222.497 5724629 2 0.0% 147892 20116443 33554499 715
|
||||
call_this 156.41 0.326 156.078 780036 0 50.0% 40005 5440760 5440760 1632
|
||||
cmp_ops 549.54 0.266 549.276 5800025 0 0.0% 0 0 0 0
|
||||
code_forge 757.16 0.232 756.923 110018 0 0.0% 10000 1651670 1651670 0
|
||||
coercion_boolean 344.39 0.256 344.135 4450023 0 0.0% 0 0 0 0
|
||||
coercion_concat 243.44 0.336 243.109 2300025 0 0.0% 0 3888890 3888890 39
|
||||
coercion_nullish 464.60 0.336 464.263 5100032 0 50.0% 1 136 192 192
|
||||
coercion_tonumber 196.41 0.316 196.092 2600023 0 0.0% 0 0 0 0
|
||||
coercion_toprimitive 190.64 0.350 190.291 540025 0 0.0% 120000 17900000 17900000 1815
|
||||
coercion_tostring 447.56 0.305 447.255 4600025 0 0.0% 0 4700036 4700036 83
|
||||
gc_array 689.05 0.281 688.768 4390027 0 100.0% 5000 10300000 10300000 672
|
||||
gc_object 156.40 0.284 156.117 1550025 0 100.0% 50000 6800000 6800000 192
|
||||
gc_string 48.96 0.218 48.744 460025 0 0.0% 0 788890 788890 40
|
||||
gc_string_long 2560.70 0.202 2560.497 23000025 2 0.0% 0 7334531 33554441 41
|
||||
ic_cache 66.87 0.497 66.376 574039 0 78.9% 10001 1740160 2051232 2051232
|
||||
ic_polymorphic 313.98 0.455 313.528 4033387 0 100.0% 3 408 576 576
|
||||
loop_do_while 301.70 0.266 301.434 3000019 0 0.0% 0 0 0 0
|
||||
loop_for 1560.58 0.263 1560.321 16000023 0 0.0% 0 0 0 0
|
||||
loop_for_in 787.03 0.447 786.580 7591739 0 0.0% 1 3626 3626 1184
|
||||
loop_for_of 312.69 0.379 312.312 3652739 0 99.0% 12001 1857960 1857960 1184
|
||||
loop_for_of_string 247.08 0.367 246.714 2726339 0 0.0% 3000 466150 466150 132
|
||||
loop_index 537.50 0.382 537.119 6367739 0 99.0% 1 3960 3960 1184
|
||||
loop_while 1531.00 0.278 1530.725 16000023 0 0.0% 0 0 0 0
|
||||
loop_while_index 550.18 0.581 549.598 6667739 0 99.0% 1 3960 3960 1184
|
||||
map_ops 1122.39 0.444 1121.945 12650027 0 100.0% 100000 17200000 17200000 816
|
||||
math_ops 613.63 0.400 613.232 6500023 0 0.0% 0 0 0 0
|
||||
mem_array_grow 461.49 0.283 461.206 3800024 0 0.0% 1 160 2097312 2097312
|
||||
mem_closure_chain 151.56 0.534 151.025 590034 0 0.0% 80000 12558890 12558890 10079778
|
||||
mem_cross_call_retain 309.27 0.412 308.858 1590032 0 25.0% 60004 11970749 11970749 8693357
|
||||
mem_map_retain 78.33 0.292 78.040 600021 0 100.0% 20002 4698124 7063172 7063172
|
||||
mem_object_graph 141.57 0.405 141.164 901110 0 0.0% 65536 8912936 8912936 6291984
|
||||
mem_set_retain 53.43 0.250 53.179 460021 0 100.0% 20002 3809234 5158474 5158474
|
||||
mem_string_accum 131.05 0.249 130.802 960020 0 0.0% 1 2744633 3268921 3268921
|
||||
mem_string_rope 3.41 0.242 3.170 16025 6 0.0% 0 124184000 124184000 124184000
|
||||
member_compound 401.61 0.385 401.227 4400076 0 100.0% 6 872 1152 1152
|
||||
object_keys 579.82 0.404 579.418 3740027 0 0.0% 20000 18360000 18360000 416
|
||||
prop_access 221.86 0.288 221.572 2800036 0 100.0% 1 136 192 192
|
||||
prop_bracket 202.08 0.310 201.770 2100036 0 100.0% 1 136 192 192
|
||||
prop_delete 69.38 0.332 69.045 480034 0 50.0% 1 136 192 192
|
||||
prop_dynamic 102.98 0.306 102.677 1100028 0 100.0% 1 136 192 192
|
||||
prop_nested 163.88 0.319 163.557 1550025 0 100.0% 150000 20400000 20400000 576
|
||||
prop_set 269.92 0.304 269.613 3200032 0 100.0% 1 136 192 192
|
||||
property 138.89 0.391 138.496 111035 0 0.0% 1 231916 231916 32928
|
||||
set_ops 912.16 0.317 911.843 9950027 0 90.9% 100000 17200000 17200000 320
|
||||
string_build 2114.84 0.447 2114.389 16560027 4 0.0% 0 6791197 33554520 122
|
||||
string_case 215.55 0.310 215.236 1600028 0 0.0% 0 7600000 7600000 0
|
||||
string_char 387.59 0.282 387.306 3800025 0 0.0% 0 0 0 0
|
||||
string_concat 211.00 0.482 210.516 1800031 0 0.0% 0 1900000 1900000 38
|
||||
string_indexof 113.79 0.270 113.516 1100028 0 0.0% 0 0 0 0
|
||||
string_length 518.29 0.507 517.781 6361939 0 99.0% 1 7750 7750 4974
|
||||
string_replace 68.29 0.360 67.926 600030 0 0.0% 0 1320000 1320000 66
|
||||
string_replace_fn 1406.71 0.449 1406.266 64987 4 0.0% 97236 47879195 51827703 13249
|
||||
string_split 121.96 0.321 121.636 540030 0 0.0% 20000 24520000 24520000 1226
|
||||
string_substring 151.21 0.289 150.918 1500030 0 0.0% 0 2150000 2150000 43
|
||||
string_trim 50.80 0.265 50.540 460028 0 0.0% 0 1560000 1560000 0
|
||||
try_catch_ok 77.73 0.248 77.485 1050023 0 0.0% 0 0 0 0
|
||||
try_catch_throw 64.34 0.493 63.845 580023 0 0.0% 20000 3440000 3440000 0
|
||||
typeof_ops 348.44 0.294 348.146 4300023 0 0.0% 100000 13600000 13600000 0
|
||||
unary_ops 351.11 0.316 350.798 3700023 0 0.0% 0 0 0 0
|
||||
|
||||
+251
-251
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user