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: Time resolution in Emacs Date: Fri, 29 Apr 2022 19:07:12 +0300 Message-ID: <83mtg3an67.fsf@gnu.org> References: <5ed963b2-3fa8-48d8-627e-bc0571d15b43@gmail.com> <52fb10fb-892a-f273-3be8-28793f27e204@cs.ucla.edu> <5cd820d4-ae67-43d4-9e63-c284d51ff1e4@gmail.com> <83tuapvcxs.fsf@gnu.org> <6efc5d24-34a2-fd30-cd20-fe4ac3e48310@cs.ucla.edu> <83fsm8tdzl.fsf@gnu.org> <9e4781b2-2ffa-b1ce-09b4-ead82cad9038@cs.ucla.edu> <83ilr3siku.fsf@gnu.org> <4e41671c-fae8-61c4-845c-4c7ba4317e88@cs.ucla.edu> <83fsm7sh2s.fsf@gnu.org> <83czhbsgc2.fsf@gnu.org> <33fb24fb-282b-cc13-a597-e7b63f19982d@cs.ucla.edu> <83y1zzq6kd.fsf@gnu.org> <837d7hr8s3.fsf@gnu.org> <83h76kq5c6.fsf@gnu.org> <9afbcc3d-b57c-b5bf-e4f6-52b352f99af8@cs.ucla.edu> <83bkwspa1r.fsf@gnu.org> <3008dea1-572b-9010-f3c4-15272145fd8a@cs.ucla.edu> <7ae621ed-d03b-00cd-bfb3-04a4a2a7d5ce@gmail.com> <2a163573-c53a-910c-4dec-4742c91336ed@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31259"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org To: Max Nikulin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 29 18:08:35 2022 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 1nkTAZ-0007xv-HR for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 18:08:35 +0200 Original-Received: from localhost ([::1]:50264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkTAY-0006f1-Fl for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 12:08:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkT9H-0003y9-E0 for emacs-devel@gnu.org; Fri, 29 Apr 2022 12:07:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkT9E-0004fK-I9; Fri, 29 Apr 2022 12:07:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mk+sA9XG10XLiAvAgP/3GspALWqLS09KmxAaJ8f0WXA=; b=jf0kOA21V6Wf 6DSOWJUqOSGPzl8fvxCPczyWWrNKI3rqieGP8eEFIG9oRLih6oQgQqJF54I9U4UN2poCArfSIrxpr bo+RnFuD+RHtPO2wiS2qBGmWXHJfkYqWGGn6cwBtXsefZDASbZzvL4xTAB8EPQQpjBESH/htKoQa/ tUeHEvBRc9GAxEJjrOLtWrCpSF8Q4VqwBQIA7pWOInCzkqxZfRwTg5nb9yE5TzOhrLtOT+zcW4yDK s6h8nipwGTmlHCR3ByJCbz6yYb3QAKV8wLsax9eKmck0Ck/A4F8zCcuZzAcYPiFclc4uX6wG5JmQU 5eOiZLFtY7Yt+wuss8y8TQ==; Original-Received: from [87.69.77.57] (port=1365 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkT9D-000724-JJ; Fri, 29 Apr 2022 12:07:12 -0400 In-Reply-To: <2a163573-c53a-910c-4dec-4742c91336ed@gmail.com> (message from Max Nikulin on Fri, 29 Apr 2022 22:19:10 +0700) 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" Xref: news.gmane.io gmane.emacs.devel:289003 Archived-At: > Date: Fri, 29 Apr 2022 22:19:10 +0700 > Cc: Eli Zaretskii , emacs-devel@gnu.org > From: Max Nikulin > > >> As to 16ms resolution, at least for `benchmark-run' I would like to have > >> finer granularity. > > > > Do you really run benchmarks that end in a matter of milliseconds? > > It may be enough for quick estimations during comparison of methods > having order of magnitude difference in running time. Ut usually produces skewed or random results, IME. > Sometimes it is necessary to measure duration of particular calls > without repetition. In which case one must arrange for repetitions that don't have the effect of repetitions. > > In any case, measuring a time interval with high precision doesn't > > necessarily need a fine-granular wall clock. > > My experience is that it is even less probable to find monotonic clock > or performance counters implemented when some legacy method is used for > wall time. My experience is different.