From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS codegen Date: Fri, 14 Jun 2024 13:52:54 +0300 Message-ID: <86sexfyewp.fsf@gnu.org> References: <87le3b43qi.fsf@gmail.com> <86r0d21tqj.fsf@gnu.org> <877cetgqiz.fsf_-_@gmail.com> <87wmmsg2e4.fsf@gmail.com> <87plskg035.fsf@gmail.com> <87ed90fyd3.fsf@gmail.com> <86zfroxc6l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6942"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 14 12:53:35 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sI4Yp-0001dl-F3 for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jun 2024 12:53:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sI4YG-0007MQ-DT; Fri, 14 Jun 2024 06:53:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sI4YE-0007L6-CV for emacs-devel@gnu.org; Fri, 14 Jun 2024 06:52:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sI4YE-0005Zu-4D; Fri, 14 Jun 2024 06:52:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=x2zbPjbhTHCPJyphtLN/TgFYO2PxoA0TJVcgAws8NhE=; b=YFkUft2aWWCdJ9tKitfX 77c1jYhhY220OmY8l4LKv7HUznl8ZwxEi4Sa6Sos4LSbYMbMGvPjiaCeeftGkCESnutSynM3+1uzC ByXTKwiRr43ZfT5bIwLl8I+JWwVz2wigC/DK68OX/QuMuAFekDJLxWmw9g8netBigRGk0nZdRHpe5 ApgtrhlHkmg62ja0pYS2AlT2uaFKmqf567Xz9tVmsUPPeZlpG1ExLOKXmupdHFKYQlILgu1756qCV W2JgagEI/Wlyc7XD036L9QbpjqhiLQrV2KOUgMWHcgmTtck46b13NnuHaMg4+QMkxPO6lxosY0O27 4M2qhZr2EgarCQ==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 14 Jun 2024 09:56:07 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320061 Archived-At: > From: Gerd Möllmann > Cc: eller.helmut@gmail.com, emacs-devel@gnu.org > Date: Fri, 14 Jun 2024 09:56:07 +0200 > > Gerd Möllmann writes: > > > Eli Zaretskii writes: > > > >>> From: Gerd Möllmann > >>> Cc: Eli Zaretskii , emacs-devel@gnu.org > >>> Date: Thu, 13 Jun 2024 21:37:41 +0200 > >>> > >>> Maybe one could reserve + commit a suitable block upfront, maybe as one > >>> big IGC_OBJ_PAD, and use read(2) or so to read the .pdmp into that > >>> block. > >> > >> Wouldn't that slow down startup? pdumper uses memory-mapped files to > >> make that as fast as possible, and for a good reason: at the time > >> pdumper was introduced people objected to have startup slow down even > >> by a few hundreds of milliseconds. > > > > I don't know. Did pdumper do many reads that were replaced with one > > mmap? This one could do one large read instead of one mmap. > > Found this benchmarking code: > > https://github.com/david-slatinek/c-read-vs.-mmap > > It comes to the conclusion that, for 32MB files, mmap is 17% faster than > a sequence of reads of 16Kb each (2000 calls). Hm. I think we need absolute timings, not relative ones. The pdumper code times itself, see pdumper-stats. For example, the production session where I'm typing this took 17.4 msec to run all of pdumper_load. We need to be sure any new code, if it is implemented, does not add any significant time to the baseline.