mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
parallel: {{perlexpr}} improved.
This commit is contained in:
parent
9fed0bfa17
commit
c21034b33b
|
@ -6185,11 +6185,12 @@ 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;
|
||||
$target =~ s/( \{\{(.*?)\}\})//g;
|
||||
}
|
||||
|
||||
# Which replace strings are used?
|
||||
|
|
BIN
src/parallel.pdf
BIN
src/parallel.pdf
Binary file not shown.
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue