Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Speed/Efficiency tweaks for a fannkuch benchmark script? (300%)

by BrowserUk (Patriarch)
on Dec 01, 2005 at 23:47 UTC ( [id://513485]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     count     wall-time cpu-time line#
     22169434  157.7315  326.3050    26:                    
        @q[ 0 .. $k-1 ] = reverse @q[ 0 .. $k-1 ];
    
  2. or download this
      4500244   18.0823   53.2090    39:
            @copy[ $index - 1, $index ] = @copy[ $index, $index - 1 ]
    ...
                    push @max_sequence, join '', @copy, "\n"
      3265920   12.2326   37.4380    23:
                    my @q = @copy;
    
  3. or download this
     22169434   96.3426  273.7840    28:
                        substr( $q, 0, $k ) = reverse substr( $q, 0, $k );
    ...
                    my $q = $copy;
      3265920    9.1315   34.8530    34:
                    push @max_sequence, $copy
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://513485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-24 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found