From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felician Nemeth Newsgroups: gmane.emacs.devel Subject: (byte-compile '(append '(1 2) '(3 4))) Date: Sat, 16 Mar 2024 13:16:36 +0100 Message-ID: <87r0gatlqz.fsf_-_@betli.tmit.bme.hu> References: <87v8j28c2x.fsf@betli.tmit.bme.hu> <874jdipfp5.fsf@posteo.net> <87cys6t734.fsf@betli.tmit.bme.hu> <87r0gmnjq4.fsf@posteo.net> <87o7bprr04.fsf@betli.tmit.bme.hu> <87bk7p57yz.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5844"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Philip Kaludercic To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 16 13:17:45 2024 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 1rlSyv-0001HR-08 for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Mar 2024 13:17:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlSy0-0002MF-5o; Sat, 16 Mar 2024 08:16:48 -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 1rlSxv-0002Lv-Mp for emacs-devel@gnu.org; Sat, 16 Mar 2024 08:16:44 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlSxt-0003JH-Kx for emacs-devel@gnu.org; Sat, 16 Mar 2024 08:16:43 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-568107a9ff2so3506955a12.3 for ; Sat, 16 Mar 2024 05:16:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710591398; x=1711196198; darn=gnu.org; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=dGbVu+QHRtlMmgoEiZ5sxiVQ75Sd2X8JIuFGZZFGY/4=; b=KTCTvBtvkR73x8B5lkNMHSbzgeOalSpB2/PacHxc06LDJOTthR3ygw+TN1VQg8j2fh 4XjX8JrYEUNimAdwT67a9qlbyIFgyXwjMphLw2yK6m+H9dgshm3FLQfUPvLIxPYgzSWA 3qumdrn1GhL5Ab9Qe62G9J0KJsYoS+SW+rg5K0B/p1KJOSRuyOiiGVYmDrC1lTnAYNhz /MNbKxPPxWJ8RGN/vO5kf42IkxuVWhg7k3SwLZCtatNNWJPuG87KKDpxnCZRurI/CWID jY5ETIaam07DuikKXmC4VS7LZ0BmoFmX2cRyZTQ6efLc0qiDKY7BdgOeIWf9T+iR9meg kO+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710591398; x=1711196198; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dGbVu+QHRtlMmgoEiZ5sxiVQ75Sd2X8JIuFGZZFGY/4=; b=wovmFef7XyvWGwj820zaeYqFnY7pxjqPbEQLfdwfLWkVRBuZ9zqDiV2CZ/6BgEKGYi qWFCUqqQrO+CmitRxFE+eIZ7aoKvEEo5MUBXNNC0lxy2oq4FCiIlvlKNUQplvuurGYzo JEMb068SFekHrBIrnz+sxv59663Qs6YJD4llBkvKwlkwYxEoWV2yAjceixSnhhOsNlm4 iyBmHejEdml8jcnRVReSuBi/bzt5QoCPWCOLH5N3L8Eu9JyxkO8C6p3KAwqPERn0AklZ eqt1ubJlQ82jw3dIW78s96WrUdwykt7q6Rhvqyoy9NMLWjFIsQ0X9ScgiIlKgVZTuRcF 5ebw== X-Gm-Message-State: AOJu0YxYh6CTG9fOBGjuU7zSBW7FteRDpHozwUJaTUVo+UhZ0v/QF+Q4 auxiJOsZoE+gAW2dHh+Mrgv2SmKCqwavkzuHjZRiTzXufilkN4bv70hfhir8 X-Google-Smtp-Source: AGHT+IGCqDzg/Q/1/RxvtCnc/+tUBbJjw9lbMHWSoHhNV9Kutd9hOQrtYu87dnBzMt0igMNyNcmH9g== X-Received: by 2002:a05:6402:5cf:b0:568:b622:f230 with SMTP id n15-20020a05640205cf00b00568b622f230mr2524889edx.36.1710591397710; Sat, 16 Mar 2024 05:16:37 -0700 (PDT) Original-Received: from betli.gmail.com (catv-213-222-160-137.catv.fixed.vodafone.hu. [213.222.160.137]) by smtp.gmail.com with ESMTPSA id g17-20020aa7d1d1000000b00568a44036a2sm2274591edp.46.2024.03.16.05.16.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 05:16:37 -0700 (PDT) In-Reply-To: <87bk7p57yz.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 08 Mar 2024 10:33:08 +0000") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=felician.nemeth@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317107 Archived-At: (disassemble (byte-compile '(append '(1 2) '(3 4)))) resuts in byte code: args: nil 0 constant append 1 constant (1 2) 2 constant (3 4) 3 call 2 4 return Instead I expected it to be something like byte code: args: nil 0 constant 1 1 constant 2 2 constant 3 3 constant 4 4 list4 5 return I've never looked at byte-code optimization before, and I'm guessing this is not a huge improvement, but I still wonder when all the arguments of side-effect-free function are constants would it make sense to calculate the result at compile time. Thanks.