GNU bug report logs -
#76103
[PATCH] New function 'process-output'
Previous Next
Full log
View this message in rfc822 format
Alvaro Ramirez <alvaro <at> xenodium.com> writes:
> Thanks Eli.
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> I'm not sure a 2.5 boost in performance
>
> (let ((before (benchmark-run 1000
> (shell-command-to-string "seq 200")))
> (after (benchmark-run 1000
> (process-output "seq" "200"))))
> (/ (car before)
> (car after))) => 3.27
>
> Roughly a 3.27 gain, or should I calculate differently?
I would benchmark this against `process-lines` instead, because it
doesn't spawn a shell. On this macOS machine, I get 1.15 for that
benchmark.
>> (on which platform, btw?) justifies yet another API.
>
> macOS. Need to grab a hold of a linux box to get equivalent
> figure.
AFAIU, the body of the proposed `process-output` could be reduced to
(string-join (process-lines cmd) "\n")
This makes me doubt if it's worth adding this new API.
To find arguments that would justify the addition, I'd take a look at
emacs.git to see which code we have that it would simplify. I'd also
take a look at packages on GNU ELPA, NonGNU ELPA, and MELPA, to find
even more supporting evidence.
This bug report was last modified 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.