From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#65491: [PATCH] Improve performance allocating vectors Date: Sat, 16 Sep 2023 18:32:31 +0200 Message-ID: References: <6B2EDD07-AAEB-40E8-B369-F634296BD3D9@gmail.com> <83v8cagkqv.fsf@gnu.org> <83ttrugkj2.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11324"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65491@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 16 18:33:34 2023 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 1qhYEf-0002em-7v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Sep 2023 18:33:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhYE5-0003SA-8n; Sat, 16 Sep 2023 12:32:57 -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 1qhYE3-0003S0-TL for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 12:32:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhYE3-0008Mt-LT for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 12:32:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhYEA-0003Gs-7A for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 12:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Sep 2023 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65491 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65491-submit@debbugs.gnu.org id=B65491.169488197212554 (code B ref 65491); Sat, 16 Sep 2023 16:33:02 +0000 Original-Received: (at 65491) by debbugs.gnu.org; 16 Sep 2023 16:32:52 +0000 Original-Received: from localhost ([127.0.0.1]:48406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhYE0-0003GQ-7H for submit@debbugs.gnu.org; Sat, 16 Sep 2023 12:32:52 -0400 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:49597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhYDv-0003G9-C2 for 65491@debbugs.gnu.org; Sat, 16 Sep 2023 12:32:50 -0400 Original-Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-502984f5018so5187631e87.3 for <65491@debbugs.gnu.org>; Sat, 16 Sep 2023 09:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694881953; x=1695486753; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=H7bmbRajsVEk756mKnkxsIMozbsc5g2cXAeevBVrcPY=; b=XcHPT+KV5KW7BiFp2LD+tEju9yhwMO1VxNtRfqLc4fZISVSUkJrFtyQ3LCkmIfHW5X FOQ6bWpB99Gle+JfooTJ27TFy/rQ2/qs3R865JCEIP+YvPR8HheZ+qnPKoPhVMOm3pc9 RZPKN8NtJW0/bFCGHL6cSW+5R3LZU3T5aBRmHUNhBNBBapJr7LEW9n/KPVFDn6/OiEmx iVW0408e3EafHxIBqzA06mF1AngZRR7B6Lk+w6IIaPKjPpbcWJcCTKFMM31XWSKPrscr gdVJgxg0SyJ3OITuoluiIksXfyYPoJFyF4+p9r4JjVD9wdnLPpFPee7HacYKapG3caza vEyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694881953; x=1695486753; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=H7bmbRajsVEk756mKnkxsIMozbsc5g2cXAeevBVrcPY=; b=IbeoLJDqCsTEppB8hU5WqPD403inPSZ99rGlUw6uhjGVNBBVQRzrnp6NsD7xJpidY/ dtF3xH42y1pojOEHoMfgv6BhJ/4FlIRber+Tx8cUmr/y++Uh3WEoPJCtFyBbghN4TVRK 5tES/giuR/vpZNwlmME2zFCtSMIwLbdaaVHkBTTO0jP7rdG9U2MIRL2sCR7hd/bAx8a9 exOc9Vyz/yY0V+cficdnEU2vjkN4kRHsYgSNq/VvsMf97Q+XpY9H+X5aKCglpPhHtzUa 20XntqbIiyrokf7iWg77SZ6VdTVpra7U5mCHhtxEAuvbdBc0kCqcmT1X9sUK4rVXbcxk nd8w== X-Gm-Message-State: AOJu0Yxru0nPl5CVhhMwktj8eMQFqB52JKwwOpgbEYn9iN6WjXDfiyT/ 1zxjUWm92oz/kTkFC3u5HdU= X-Google-Smtp-Source: AGHT+IFqbIYs8W/NTsJOfE3mgAK/A03L3vr0MUeJF6W0XIYJT0rfKMJvSUqTtNL3NdF/hE7iGPaxEQ== X-Received: by 2002:a05:6512:539:b0:500:ba68:2344 with SMTP id o25-20020a056512053900b00500ba682344mr3642848lfc.20.1694881953284; Sat, 16 Sep 2023 09:32:33 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id n9-20020ac242c9000000b00501c022163dsm1077446lfl.222.2023.09.16.09.32.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Sep 2023 09:32:32 -0700 (PDT) In-Reply-To: <83ttrugkj2.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270634 Archived-At: 16 sep. 2023 kl. 18.17 skrev Eli Zaretskii : >> The latter one completely broke the 32-bit build --with-wide-int, = most >> probably because the last argument to XUNTAG is frequently a pointer >> to a 64-bit type, where uintptr_t is only 32-bit wide. >=20 > No, that's not it: the reason is that the _first_ argument is a 64-bit > data type, and then casting XLP(a) to uintptr_t causes the warning, > because uintptr_t is a 32-bit type. Let's see if I understand this correctly, as I can't try that = configuration myself. In your configuration, Lisp_Object is a 64-bit integer (or a struct = containing one). LISP_WORD_TAG(type) is also a 64-bit integer with tag bits at the top = (USE_LSB_TAG=3D0). The old XUNTAG was: #define XUNTAG(a, type, ctype) ((ctype *) \ ((char *) XLP (a) - LISP_WORD_TAG = (type))) so that we get a subtraction of a pointer and a very large 64-bit = number, which results in just the pointer. The new XUNTAG is: #define XUNTAG(a, type, ctype) ((ctype *) \ ((uintptr_t) XLP (a) - LISP_WORD_TAG = (type))) so you get a warning from what, conversion of a 64-bit number to (ctype = *)? Does changing the definition to #define XUNTAG(a, type, ctype) \ ((ctype *) ((uintptr_t) XLP (a) - (uintptr_t)LISP_WORD_TAG (type))) help? (That is, cast the LISP_WORD_TAG return value to uintptr_t.)