In perl.git, the branch smoke-me/new_hashes has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/dc59bdf6281529d6f889a0a9a6a69be771b9fc73?hp=2913a470c6bde61bcde861f356f4acff47135191>

- Log -----------------------------------------------------------------
commit dc59bdf6281529d6f889a0a9a6a69be771b9fc73
Author: Yves Orton <[email protected]>
Date:   Thu Mar 23 22:07:49 2017 +0100

    gah, last minute cleanup accidentally disabled SBOX
    
    Cool thing is its *still* faster. :-)

M       hv_func.h

commit 61bb4ab5927cea40441b331f38a3da8d6cd3d7f1
Author: Yves Orton <[email protected]>
Date:   Thu Mar 23 22:06:51 2017 +0100

    Porting/bench.pl: allow more than one file to be read at a go

M       Porting/bench.pl
-----------------------------------------------------------------------

Summary of changes:
 Porting/bench.pl | 45 ++++++++++++++++++++++++++++++++++-----------
 hv_func.h        |  2 +-
 2 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/Porting/bench.pl b/Porting/bench.pl
index 62c6aaff54..83b76fe79d 100755
--- a/Porting/bench.pl
+++ b/Porting/bench.pl
@@ -392,7 +392,7 @@ my %OPTS = (
         'norm=s'      => \$OPTS{norm},
         'perlargs=s'  => \$OPTS{perlargs},
         'raw'         => \$OPTS{raw},
-        'read|r=s'    => \$OPTS{read},
+        'read|r=s@'   => \$OPTS{read},
         'show!'       => \$OPTS{show},
         'sort=s'      => \$OPTS{sort},
         'tests=s'     => \$OPTS{tests},
@@ -675,25 +675,48 @@ sub do_grind {
             if $bisect_min > $bisect_max;
     }
 
-    if ($OPTS{read}) {
-        open my $in, '<:encoding(UTF-8)', $OPTS{read}
-            or die " Error: can't open '$OPTS{read}' for reading: $!\n";
+    foreach my $file (@{$OPTS{read}}) {
+        open my $in, '<:encoding(UTF-8)', $file
+            or die " Error: can't open '$file' for reading: $!\n";
         my $data = do { local $/; <$in> };
         close $in;
 
         my $hash = JSON::PP::decode_json($data);
         if (int($FORMAT_VERSION) < int($hash->{version})) {
             die "Error: unsupported version $hash->{version} in file"
-              . "'$OPTS{read}' (too new)\n";
+              . "'$file' (too new)\n";
         }
-        ($loop_counts, $perls, $results, $tests, $order) =
+        my ($read_loop_counts, $read_perls, $read_results, $read_tests, 
$read_order) =
             @$hash{qw(loop_counts perls results tests order)};
+        filter_tests($read_results);
+        filter_tests($read_tests);
+        if (!$read_order) {
+            $order = [ sort keys %$read_tests ];
+        }
+        if (!$loop_counts) {
+            ($loop_counts, $perls, $results, $tests, $order) =
+                ($read_loop_counts, $read_perls, $read_results, $read_tests, 
$read_order);
+            filter_tests($results);
+            filter_tests($tests);
+            if (!$order) {
+                $order = [ sort keys %$tests ];
+            }
+        } else {
+            my @have_keys= sort keys %$read_tests;
+            my @want_keys= sort keys %$tests;
+
+            if ("@have_keys" ne "@want_keys" or
+                "@$read_loop_counts" ne "@$loop_counts")
+            {
+                die "tests run aren't the same, cant merge read files";
+            }
 
-        filter_tests($results);
-        filter_tests($tests);
-
-        if (!$order) {
-            $order = [ sort keys %$tests ];
+            push @$perls, @{$hash->{perls}};
+            foreach my $test (keys %{$hash->{results}}) {
+                foreach my $perl (keys %{$hash->{results}{$test}}) {
+                    $results->{$test}{$perl}= $hash->{results}{$test}{$perl};
+                }
+            }
         }
     }
 
diff --git a/hv_func.h b/hv_func.h
index e091c86b0f..e492b8c7f5 100644
--- a/hv_func.h
+++ b/hv_func.h
@@ -73,7 +73,7 @@
 #endif
 
 
-#if PERL_HASH_USE_SBOX32_ALSO == 1
+#if PERL_HASH_USE_SBOX32_ALSO == 0
 # define _PERL_HASH_FUNC                        __PERL_HASH_FUNC
 # define _PERL_HASH_SEED_BYTES                  __PERL_HASH_SEED_BYTES
 # define _PERL_HASH_STATE_BYTES                 __PERL_HASH_STATE_BYTES

--
Perl5 Master Repository

Reply via email to