From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#44674: 28.0.50; Adding current-cpu-time for performance tests Date: Mon, 16 Nov 2020 14:07:41 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3154"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 44674@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 16 20:31:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kekDV-0000kI-Ny for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 20:31:09 +0100 Original-Received: from localhost ([::1]:50406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kekDU-0005rY-LK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 14:31:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kejrD-0001xu-JM for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 14:08:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kejrC-0001GC-37 for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 14:08:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kejrB-0002tU-Tq for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 14:08:05 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 19:08:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44674 X-GNU-PR-Package: emacs Original-Received: via spool by 44674-submit@debbugs.gnu.org id=B44674.160555367210990 (code B ref 44674); Mon, 16 Nov 2020 19:08:05 +0000 Original-Received: (at 44674) by debbugs.gnu.org; 16 Nov 2020 19:07:52 +0000 Original-Received: from localhost ([127.0.0.1]:57253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kejqy-0002rB-HT for submit@debbugs.gnu.org; Mon, 16 Nov 2020 14:07:52 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kejqu-0002qP-MH for 44674@debbugs.gnu.org; Mon, 16 Nov 2020 14:07:51 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 647854410F5; Mon, 16 Nov 2020 14:07:43 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 41205441058; Mon, 16 Nov 2020 14:07:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1605553662; bh=8DPTln/oR+shbAJaygFQxsLCWg2/mffNXKSdwMv6Im4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=I5VvlNPNCAiGQV3CM/PKtR6Ljt1EmI0S9Mgdtws6bUZxaG3Tdk/6wJYtpEPm5ZeSn qXZqTzNtEnhJuLi4fq9RspdA+Cudo5DSjx0HOFCWwyJFvDOR10sMfx7PZzCRE2tuiJ TOpMRlseOQxY3QHZo3/pY9OJVrkGUsTe2AE6WD2Y4e5kPTF7+pwyKwg1cEVJxlr0v9 qh3PXQ7uLDYyL0F1aHsEJxSDYSCdsOG9Lo6cnZkaXrtseg2MEAYVAu4FbaTJh9OtmS wqi5Z6/0n9cjMABXu0OuViwEa46y0Pe9kTkMXU60fMvl7o+AMsjbyHPQj2xoojAMoF hFc4nWv739uaQ== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BEFE5120376; Mon, 16 Nov 2020 14:07:41 -0500 (EST) In-Reply-To: (Philipp Stephani's message of "Mon, 16 Nov 2020 19:39:35 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193462 Archived-At: >> Also since I'm not familiar with any of those interfaces, I'd welcome >> it if someone else could do that if they're interested. > I wouldn't mind doing it, if there's general agreement that it's worth having. > But it would really just be: > 1. clock_gettime(CLOCK_MONOTONIC_ID) > 2. check for errors > 3. make_lisp_time CLOCK_MONOTONIC wouldn't satisfy my needs, because it makes the duration of execution of a piece of code too depend on OS's scheduling choices.\ In my use case I need to run two chunks of code and make sure their run-time is not "wildly" different, but with wall-clock time (and CLOCK_MONOTONIC is close enough to wallclock to suffer from the same problem) any context switch in the middle of one of the two runs can cause such "wildly" different results, including make the slow code appear to be much faster than the fast one. Stefan