all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Why does adding a useless copy-sequence and discarding the result make my ELisp 40 times faster?
Date: Sun, 26 Mar 2017 08:14:38 -0500	[thread overview]
Message-ID: <86lgrs5ge9.fsf@stephe-leake.org> (raw)
In-Reply-To: <e96962c4-f0b4-9769-87c3-94548c44ce22@gmail.com> ("Clément Pit-Claudel"'s message of "Sat, 25 Mar 2017 00:06:18 -0400")

Clément Pit-Claudel <cpitclaudel@gmail.com> writes:

> I can't make sense of the following three observations: adding a
> useless (copy-sequence …) and discarding the result makes my code
> roughly 20-times faster, sending strings of length 2^16+1 to a
> subprocess is several times slower than sending strings of length
> 2^16, and sending 2^6 strings of length 2^10 is much faster than
> sending a single string of length 2^16.

I have also seen weird timing behavior with subprocess communication.

One thing to check; are you using a pipe or a pty? To use a pipe, do:

(let ((process-connection-type nil))
    (start-process ...))

There's also make-process in emacs 25, which has an arg for this.

--
-- Stephe



  parent reply	other threads:[~2017-03-26 13:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25  4:06 Why does adding a useless copy-sequence and discarding the result make my ELisp 40 times faster? Clément Pit-Claudel
2017-03-25  4:24 ` Clément Pit-Claudel
2017-03-25  7:05   ` Eli Zaretskii
2017-03-25 10:38     ` Andreas Politz
2017-03-25 13:49       ` Clément Pit-Claudel
2017-03-25 16:38         ` Andreas Politz
2017-03-25 17:02           ` Clément Pit-Claudel
2017-03-25 17:26             ` Eli Zaretskii
2017-03-25 17:40               ` Andreas Politz
2017-03-25 17:49                 ` Eli Zaretskii
2017-03-25 17:37             ` Andreas Politz
2017-03-25 13:45     ` Clément Pit-Claudel
2017-03-25 10:47   ` Andreas Politz
2017-03-25 13:54     ` Clément Pit-Claudel
2017-03-26 13:14 ` Stephen Leake [this message]
2017-03-26 13:35   ` Clément Pit-Claudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86lgrs5ge9.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.