From eea1a41d89fbecddd989b7ba6d935e449af96b1a Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 4 Dec 2024 17:47:03 +0200 Subject: [PATCH] Optimize the speed. See https://en.wikibooks.org/wiki/Optimizing_Code_for_Speed . There may have been some refactorings too. --- cpan/Games-Solitaire-Verify/benchmark/gen-par-mak.pl | 5 +++-- cpan/Games-Solitaire-Verify/benchmark/sanity-test.pl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cpan/Games-Solitaire-Verify/benchmark/gen-par-mak.pl b/cpan/Games-Solitaire-Verify/benchmark/gen-par-mak.pl index 01c9c0531..e89ec3729 100644 --- a/cpan/Games-Solitaire-Verify/benchmark/gen-par-mak.pl +++ b/cpan/Games-Solitaire-Verify/benchmark/gen-par-mak.pl @@ -8,14 +8,15 @@ my $MIN = 1; my $MAX = 32_000; -my $STEP = 100; +my $STEP = 400; my $ARGS = +{ cmd => qq#perl benchmark-no-backticks.pl -- -l lg -ni -l fg#, min => $MIN, max => ( $MAX / $STEP ), res => sub { - return "Results/" . shift . ".res"; + my ($start) = @_; + return "Results/${start}.res"; }, step => $STEP, }; diff --git a/cpan/Games-Solitaire-Verify/benchmark/sanity-test.pl b/cpan/Games-Solitaire-Verify/benchmark/sanity-test.pl index b190d820e..ccfe3e72a 100644 --- a/cpan/Games-Solitaire-Verify/benchmark/sanity-test.pl +++ b/cpan/Games-Solitaire-Verify/benchmark/sanity-test.pl @@ -56,6 +56,6 @@ sub _cleanup } } continue { ++$i; } -Carp::confess() if $i ne 101; +Carp::confess() if $i ne 401; _cleanup(); unlink( "build.ninja", "par2.mak" );