parallel: {{perlexpr}} improved.

This commit is contained in:
Ole Tange 2014-06-26 02:10:43 +02:00
parent 9fed0bfa17
commit c21034b33b
3 changed files with 9 additions and 8 deletions

View file

@ -6185,9 +6185,10 @@ sub simple_replace_placeholders {
my $n = $#args+1;
if($target =~ /\{\{.*?\}\}/) {
# Replace {{perlexp}} with value
for my $a (@args) {
$_ = $a->replace('{}',$quote);
$target =~ s/(\{\{(.*?)\}\})/eval("$2")." ".$1/eg;
@_ = map { $_->replace('{}',$quote) } @args;
for(@_) {
$target =~ s/(\{\{(.*?)\}\})/eval("$2");$_." ".$1/eg;
# $target =~ s/(\{\{(.*?)\}\})/eval("$2")." ".$1/eg;
}
$target =~ s/( \{\{(.*?)\}\})//g;
}

Binary file not shown.

View file

@ -4080,9 +4080,8 @@ echo 1,2,3 | parallel -vkd, "echo 'a'"@{@}"'b'"
@node Startup
@subsection Startup
GNU @strong{parallel} is slow at starting up - around 250 ms. Half of the
startup time is spent finding the maximal length of a command
line. Setting @strong{-s} will remove this part of the startup time.
GNU @strong{parallel} is slow at starting up - around 250 ms the first time
and 150 ms after that.
@node Job startup
@subsection Job startup
@ -4090,7 +4089,8 @@ line. Setting @strong{-s} will remove this part of the startup time.
Starting a job on the local machine takes around 3 ms. This can be a
big overhead if the job takes very few ms to run. Often you can group
small jobs together using @strong{-X} which will make the overhead less
significant.
significant. Or you can run multiple GNU @strong{parallel}s as described in
@strong{EXAMPLE: Speeding up fast jobs}.
Using @strong{--ungroup} the 3 ms can be lowered to around 2 ms.