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: [PATCH 1/3] Add gc-estimated-time variable Date: Wed, 18 Nov 2020 19:45:09 +0200 Message-ID: <83mtzepniy.fsf@gnu.org> References: <20201118002050.16426-1-sbaugh@catern.com> <20201118002050.16426-2-sbaugh@catern.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39840"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@catern.com, emacs-devel@gnu.org To: Spencer Baugh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 18 18:46:43 2020 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 1kfRXX-000AGG-Eu for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Nov 2020 18:46:43 +0100 Original-Received: from localhost ([::1]:38196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfRXW-0001qc-Gh for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Nov 2020 12:46:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfRW7-0000Fw-17 for emacs-devel@gnu.org; Wed, 18 Nov 2020 12:45:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58125) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfRW5-0005Ye-07; Wed, 18 Nov 2020 12:45:13 -0500 Original-Received: from [176.228.60.248] (port=1603 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kfRW4-0000ZN-BD; Wed, 18 Nov 2020 12:45:12 -0500 In-Reply-To: <20201118002050.16426-2-sbaugh@catern.com> (message from Spencer Baugh on Tue, 17 Nov 2020 19:20:48 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:259368 Archived-At: > From: Spencer Baugh > Date: Tue, 17 Nov 2020 19:20:48 -0500 > Cc: Spencer Baugh > Thanks, a few comments regarding style and coding conventions: > if (FLOATP (Vgc_elapsed)) > { > + const struct timespec this_gc_elapsed = timespec_sub (current_timespec (), start); Please avoid such long lines, break them into several shorter lines. > + if (gc_time_ema == 0.0) { > + /* initialize exponential moving average to first GC time */ > + gc_time_ema = timespectod (this_gc_elapsed); > + } else { > + /* decay very fast, since heap size can change rapidly */ > + gc_time_ema = 0.5 * gc_time_ema + 0.5 * timespectod (this_gc_elapsed); > + } This is not our style of using braces, please reformat to use our style.