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.bugs Subject: bug#54532: [PATCH] sorting Date: Wed, 23 Mar 2022 15:30:44 +0200 Message-ID: <83ee2seqyj.fsf@gnu.org> References: <87k0clr12o.fsf@ust.hk> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24888"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54532@debbugs.gnu.org To: Andrew Cohen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 23 14:31:35 2022 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 1nX15K-0006IR-Ow for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Mar 2022 14:31:34 +0100 Original-Received: from localhost ([::1]:50022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX15J-0005sr-Qk for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Mar 2022 09:31:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX14u-0005cx-0V for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2022 09:31:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX14s-0000Nh-Hh for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2022 09:31:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX14s-0002i9-DZ for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2022 09:31:06 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Mar 2022 13:31:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54532 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54532-submit@debbugs.gnu.org id=B54532.164804226410360 (code B ref 54532); Wed, 23 Mar 2022 13:31:06 +0000 Original-Received: (at 54532) by debbugs.gnu.org; 23 Mar 2022 13:31:04 +0000 Original-Received: from localhost ([127.0.0.1]:43161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX14q-0002gl-4I for submit@debbugs.gnu.org; Wed, 23 Mar 2022 09:31:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX14n-0002b8-UF for 54532@debbugs.gnu.org; Wed, 23 Mar 2022 09:31:02 -0400 Original-Received: from [2001:470:142:3::e] (port=36320 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX14h-0000FG-G3; Wed, 23 Mar 2022 09:30:56 -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=gHAguLYdlXidlEcV9U66AwtMEGu7tE+BKqq5tamEV5w=; b=VSm/pISHzW4v DuEgW+GVCYCkz0L1tmDuV+RWJYqxIb2RV6jbxfdvmX9NdejNHYxzHn9Dz02dP5/+LjQlfvLzvuKX3 UqqWl+GwCCCGwJm0dj46kAe5qwQYaT4j58h+0k0rFbeePOPa4jy4YVP95ENWBNYoBxQhiyHSIia+l loxikJvKBqFJHL4ItBQtGwTCnOhw/MctaROAnWQn3g5w93xK1PwssGxlYaMOdZ7sVYoHocz4QyVsC sib7h93ubgh0zN6FK/uOmiLu+Bi5HAj72JAutpCQFwjE6ipfHsq6A2UfmUQ81mtntSFjsmVoi6mGI I2q2ue4hmM2ZZHDVLCzQwQ==; Original-Received: from [87.69.77.57] (port=1595 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 1nX14g-0004mA-ST; Wed, 23 Mar 2022 09:30:55 -0400 In-Reply-To: <87k0clr12o.fsf@ust.hk> (message from Andrew Cohen on Wed, 23 Mar 2022 07:59:11 +0800) 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:228806 Archived-At: > From: Andrew Cohen > Date: Wed, 23 Mar 2022 07:59:11 +0800 > > 1. Add a new `record_unwind_protect_ptr_mark` function for use with C data > structures that use the specpdl for clean-up but also contain possibly > unique references to Lisp objects. This is needed for the dynamic > memory management that the new algorithm uses. Can you tell more why this was needed? Emacs has conservative stack marking, so any Lisp object that is referred by some stack-based variable should be protected from GC. Why isn't that enough in this case? > 4. An optimization that resolves the sorting comparison symbol into the > corresponding function before starting the sort. Any reasons this is a separate patch? Thanks a lot for working on this.