From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: Why does adding a useless copy-sequence and discarding the result make my ELisp 40 times faster? Date: Sat, 25 Mar 2017 18:37:19 +0100 Message-ID: <87inmxdzqo.fsf@luca> References: <77900613-3b45-52f4-5770-38fe6f27e69c@gmail.com> <83vaqxbzub.fsf@gnu.org> <8760ixhc9a.fsf@luca> <96d5bde3-fc20-750e-abc7-541b2abd2bd8@gmail.com> <8737e1fh1q.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490463507 31673 195.159.176.226 (25 Mar 2017 17:38:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Mar 2017 17:38:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 25 18:38:24 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crpdr-0007Po-98 for ged-emacs-devel@m.gmane.org; Sat, 25 Mar 2017 18:38:19 +0100 Original-Received: from localhost ([::1]:38115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crpdx-000618-07 for ged-emacs-devel@m.gmane.org; Sat, 25 Mar 2017 13:38:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crpdF-00060H-VV for emacs-devel@gnu.org; Sat, 25 Mar 2017 13:37:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crpdF-0000xQ-C2 for emacs-devel@gnu.org; Sat, 25 Mar 2017 13:37:42 -0400 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:41936) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crpd9-0000tW-NJ; Sat, 25 Mar 2017 13:37:35 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdecf.dynamic.kabel-deutschland.de [95.91.222.207]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 3B454179AD71; Sat, 25 Mar 2017 18:37:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1490463440; bh=epHsawW5uz7H2FD3jLlDogWkMOc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; b=Jtv3dlQ/Mrt8LlwzehGsrlmDVjwatLwpQQrxfI+5pypaqgxtSOOz2SSz32hl30a6v 8/yozCI2uusciS9kkjgq87lxztyGM6viKdWfzJAvVIprgn7q54YYD7NOo0qQCEV343 YssVw8fz0QqPhMHq4CUSEnmA+IBnT4ebjOLxyTC0= In-Reply-To: (=?utf-8?Q?=22Cl=C3=A9ment?= Pit-Claudel"'s message of "Sat, 25 Mar 2017 13:02:36 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 143.93.54.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213348 Archived-At: Cl=C3=A9ment Pit-Claudel writes: >> This suggests to me, that the deciding factor in these numbers is python >> and not Emacs. > > The thing is, I reproduced these numbers with cat and a simple C > program, so it's not python itself. OK, then I'm probably wrong. > [...] observation 1 (why is the program without sleep or copy-sequence > so slow?) I expressed a theory about this earlier. I suggest taking a look at send_process in process.c -ap