vile / bench / native / RESULTS-V2.md
155 lines · 140 sloc · 8.8 KB · 76646891b77a3d5c6af4a1e42b122cd61dc1654b
Raw

Shared Vile/Guile component benchmarks

Suite v2: 24 workloads and five configurations on the same idle Intel Mac mini (Intel(R) Core(TM) i3-8100B CPU @ 3.60GHz, 8 GiB), Guile 3.0.10 with guild compile -O2 and default JIT settings. Vile uses -prod; native kernels use Clang -O3. All jobs ran serially under the shared validation lock from a hash-verified source snapshot. No local V builds or subagents were used.

All 120 case/configuration verification pairs passed. The measured run checked all 3,840 process results, using 31 rotating measured samples per pair and one excluded process warmup: 3,720 measured rows and 120 excluded rows. Every original invocation checks an exact integer checksum. The original four source files and 100-call batches are unchanged. Other cases use the per-case counts in cases.json; every variant uses the same count for a case.

Ratios are Guile/Vile: above 1 means Vile is faster; below 1 means Guile is faster. Geometric means weight all 24 cases equally. These are component microbenchmarks, not an application-wide performance prediction. The earlier four-kernel result is preserved in LEGACY-4.md.

Configuration Geometric mean Guile/Vile Faster cases Slower cases
interpreter-arena 0.083x 2/24 22/24
interpreter-gc 0.083x 3/24 21/24
native-arena 0.129x 6/24 18/24
native-gc 0.131x 6/24 18/24
Category Cases Interpreter GC geomean Native GC geomean
collections 5 0.138x 0.094x
goops 2 0.278x 0.219x
integer-kernels 4 0.032x 3.905x
numeric 4 0.161x 0.133x
procedures-control 5 0.023x 0.010x
text-ports 4 0.157x 0.124x

Native execution had zero measured native entries in 17 of 24 native-GC workloads. 0 workloads recorded a native deoptimization during warmup or timing. All remain in the tables and summaries. Entry counts show activity, not the fraction of instructions compiled; mixed workloads can have many small native calls while most work stays interpreted.

Prepared times below exclude VM/source setup, compatibility imports, first-use compilation and five warmup invocations. Collector variants perform an explicit GC before timing; collections during the batch count. Arena memory is released at process exit, so this comparison does not establish equivalent memory use. IQR is the inclusive 25th–75th percentile of per-invocation times.

Workload Category Guile us Interpreter GC us Native GC us [IQR] Guile/native Native entries/call
tail-sum-10k integer-kernels 33.570 1186.974 14.793 [14.784, 14.807] 2.269x 1
fib-20 integer-kernels 131.190 2852.944 85.554 [85.409, 85.688] 1.533x 1
closure-5k integer-kernels 15.450 875.205 1.843 [1.838, 1.845] 8.384x 1
list-3k integer-kernels 59.800 1233.899 7.500 [7.478, 7.518] 7.973x 1
flonum-sum-2k numeric 66.700 530.245 576.936 [576.651, 577.363] 0.116x 0
bignum-fib-200 numeric 5.300 55.630 71.311 [71.232, 71.433] 0.074x 0
rational-harmonic-80 numeric 48.200 94.840 98.802 [98.538, 99.043] 0.488x 0
integer-divmod-5k numeric 169.500 1521.104 2257.581 [2256.992, 2260.109] 0.075x 0
list-map-1k collections 46.700 143.102 304.340 [303.773, 308.818] 0.153x 1000
list-reverse-2k collections 58.700 636.285 702.996 [702.115, 704.204] 0.083x 0
vector-update-2k collections 10.800 836.600 1193.879 [1193.229, 1195.210] 0.009x 0
bytevector-fill-4k collections 16.600 1325.314 2026.907 [2024.581, 2030.909] 0.008x 0
hashtable-count-1k collections 5955.700 577.012 764.939 [764.233, 767.239] 7.786x 0
string-build-1k text-ports 39.600 38.016 41.137 [41.075, 41.756] 0.963x 0
string-scan-4k text-ports 52.300 1007.024 1599.833 [1598.185, 1603.617] 0.033x 0
unicode-scan-1k text-ports 13.300 1877.628 2401.632 [2396.920, 2406.883] 0.006x 0
datum-read-write-200 text-ports 1908.000 1193.830 1411.328 [1406.359, 1415.933] 1.352x 0
closure-mutate-2k procedures-control 8.600 426.928 1114.795 [1114.550, 1117.377] 0.008x 0
higher-order-2k procedures-control 6.900 598.335 1772.036 [1766.980, 1779.963] 0.004x 4000
callcc-escape-1k procedures-control 6.400 121.944 246.935 [246.602, 247.212] 0.026x 0
values-consumer-1k procedures-control 4.300 622.722 1250.640 [1245.929, 1281.591] 0.003x 1000
dynamic-wind-200 procedures-control 11.900 159.323 304.806 [304.114, 305.802] 0.039x 0
goops-dispatch-1k goops 107.800 709.645 880.535 [879.400, 888.490] 0.122x 0
goops-allocate-200 goops 55.200 108.538 141.357 [141.184, 142.083] 0.391x 0
Workload Interpreter arena us Native arena us Guile/native arena
tail-sum-10k 1152.972 14.943 2.247x
fib-20 2730.976 85.847 1.528x
closure-5k 845.208 1.964 7.866x
list-3k 1178.154 7.043 8.491x
flonum-sum-2k 503.325 582.558 0.114x
bignum-fib-200 56.132 73.318 0.072x
rational-harmonic-80 105.417 109.330 0.441x
integer-divmod-5k 1469.370 2255.657 0.075x
list-map-1k 139.007 301.988 0.155x
list-reverse-2k 619.840 676.420 0.087x
vector-update-2k 824.940 1191.510 0.009x
bytevector-fill-4k 1286.215 2026.784 0.008x
hashtable-count-1k 589.211 791.258 7.527x
string-build-1k 54.097 58.031 0.682x
string-scan-4k 982.457 1628.315 0.032x
unicode-scan-1k 1750.144 1938.446 0.007x
datum-read-write-200 1299.336 1355.930 1.407x
closure-mutate-2k 412.451 1163.139 0.007x
higher-order-2k 584.317 1749.252 0.004x
callcc-escape-1k 119.030 254.931 0.025x
values-consumer-1k 570.713 1216.837 0.004x
dynamic-wind-200 150.897 313.840 0.038x
goops-dispatch-1k 732.524 914.664 0.118x
goops-allocate-200 116.798 151.911 0.363x

First-call and whole-process durations are separate. Whole-process time includes setup, warmup, the complete measured batch, compilation and cleanup; it is not a standalone startup measurement. These columns expose native compilation cost.

Workload Guile first call ms Native GC first call ms Guile process ms Native GC process ms
tail-sum-10k 0.045 360.177 45.374 374.315
fib-20 0.146 356.854 55.502 378.456
closure-5k 0.026 361.903 43.469 374.871
list-3k 0.068 375.882 48.298 389.619
flonum-sum-2k 0.126 0.666 42.328 20.536
bignum-fib-200 0.030 0.182 41.241 13.001
rational-harmonic-80 0.098 0.237 41.603 13.113
integer-divmod-5k 0.202 2.349 43.625 45.809
list-map-1k 0.135 352.423 42.890 369.726
list-reverse-2k 0.099 0.817 42.111 23.155
vector-update-2k 0.039 1.297 41.897 29.922
bytevector-fill-4k 0.051 2.129 41.360 42.449
hashtable-count-1k 6.157 0.905 144.531 23.904
string-build-1k 0.122 0.186 41.964 12.823
string-scan-4k 0.090 1.690 42.001 36.048
unicode-scan-1k 0.051 2.482 41.396 48.199
datum-read-write-200 3.622 2.118 65.554 28.057
closure-mutate-2k 0.035 1.196 41.296 28.767
higher-order-2k 0.029 353.398 41.923 391.059
callcc-escape-1k 0.041 0.334 41.301 15.732
values-consumer-1k 0.033 354.240 41.821 384.882
dynamic-wind-200 0.039 0.418 42.003 16.831
goops-dispatch-1k 0.194 1.556 56.072 22.903
goops-allocate-200 0.111 0.248 55.481 14.921

The shared timed definitions include flonums, exact bignums/rationals, integer division, list operations, vectors/bytevectors/hashtables, strings/Unicode, datum ports, mutable closures, higher-order calls, continuations, multiple values, dynamic-wind and GOOPS dispatch/allocation. Per-engine imports supply matching APIs before timing; workload bodies and the checked batch loop are identical. Fresh mutable state is created inside each benchmark invocation.

Reproduce from a hash-verified Mac snapshot under the shared lock:

python3 bench/native/compare.py build
python3 bench/native/compare.py verify
# Separately, once builds/tests finish and the Mac is idle:
python3 bench/native/compare.py measure

Use VEXE/GUILE/GUILD when tools are outside PATH. Output in native-results-v2/ contains raw samples, verification results, source/tool/binary hashes, exact flags, compatibility imports, native counters, first-call/process durations, medians, IQR/ranges and category summaries. Completed groups resume without restarting the whole suite. No workloads were removed or selected by speed.