Commit b1eefb4e

b1eefb4e6edeMerged

Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 4 files · ~1 modified · -3 deleted

Description

bench: drop 3 redundant benchmarks (2 duplicates + 1 degenerate)

Two duplicates and one benchmark that spinel collapses to a no-op loop, identified during a sweep of benchmark/:

  • nqueens.rb is the same algorithm as bm_nqueens.rb modulo the outer iteration count (1000 vs 10). Keeping the bm_-prefixed version since the rest of the directory follows that convention.
  • bm_spectralnorm.rb and bm_spectral_norm.rb are two different implementations of the same Spectral Norm benchmark. Keeping the CLBG-derived one (bm_spectral_norm.rb) so cross-language comparisons against benchmarksgame numbers stay valid.
  • bm_cfunc_itself.rb measures i.itself in a tight loop. spinel lowers Integer#itself to identity, so the body collapses to a loop with no payload — only loop overhead is measured, which is already covered by bm_nested_loop.rb. (Sister bench bm_respond_to.rb has the same shape but also exercises the static respond_to? table; kept for now.)

After: 53 benchmarks, all pass. README counts updated in lockstep.

Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

Details

Commit
b1eefb4e6ede
Parent
33d7232698c8

README.mdmodifiedView file

@@ -81,7 +81,7 @@
8181
8282 ## Benchmarks
8383
84-290 tests pass. 56 benchmarks pass.
84+290 tests pass. 53 benchmarks pass.
8585 Geometric mean: **~11.6x faster** than miniruby (Ruby 4.1.0dev) across
8686 the 28 benchmarks below. Baseline is the latest CRuby `miniruby` build
8787 (without bundled gems), which is considerably faster than the system
@@ -263,7 +263,7 @@
263263 lib/sp_bigint.c Arbitrary precision integers (5_394 lines)
264264 lib/regexp/ Built-in regexp engine (1_866 lines)
265265 test/ 290 feature tests
266-benchmark/ 56 benchmarks
266+benchmark/ 53 benchmarks
267267 Makefile Build automation
268268 ```
269269
@@ -293,7 +293,7 @@
293293 make deps # fetch libprism into vendor/prism (one-time)
294294 make # build parser + regexp library + bootstrap compiler
295295 make test # run 290 feature tests (requires bootstrap)
296-make bench # run 56 benchmarks (requires bootstrap)
296+make bench # run 53 benchmarks (requires bootstrap)
297297 make bootstrap # rebuild compiler from source
298298 sudo make install # install to /usr/local (spinel in PATH)
299299 make clean # remove build artifacts