From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Why is booleanp defined this way? Date: Sat, 18 Apr 2015 09:44:46 +0200 Message-ID: <87ioct7udt.fsf@mbork.pl> References: <87siby7au6.fsf@mbork.pl> <877ftapd6v.fsf@debian.uxu> <87oammmfn4.fsf@kuiper.lan.informatimago.com> <871tjint39.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429343120 15310 80.91.229.3 (18 Apr 2015 07:45:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Apr 2015 07:45:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 18 09:45:12 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YjNR8-0008Ud-Q1 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Apr 2015 09:45:10 +0200 Original-Received: from localhost ([::1]:44817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjNR8-00022o-7K for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Apr 2015 03:45:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjNQy-00022Z-MM for help-gnu-emacs@gnu.org; Sat, 18 Apr 2015 03:45:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjNQu-0005H9-KQ for help-gnu-emacs@gnu.org; Sat, 18 Apr 2015 03:45:00 -0400 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:43490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjNQu-0005H5-Cr for help-gnu-emacs@gnu.org; Sat, 18 Apr 2015 03:44:56 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id DFC974FA03B for ; Sat, 18 Apr 2015 09:44:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LXi1TANnYNRV for ; Sat, 18 Apr 2015 09:44:52 +0200 (CEST) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 3BFE54F6079 for ; Sat, 18 Apr 2015 09:44:52 +0200 (CEST) In-reply-to: <871tjint39.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:5e00:2:52::8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103808 Archived-At: Hi all, I love how I inadvertently start these huge threads... Really, I didn't mean it! On 2015-04-18, at 03:06, Emanuel Berg wrote: > "Pascal J. Bourguignon" > writes: > >> You may want to compare: >> >> (defun normalize-boolean (obj) >> (if obj t)) >> (disassemble (byte-compile 'normalize-boolean)) >> byte code: >> args: (obj) >> 0 varref obj >> 1 goto-if-nil-else-pop 1 >> 4 constant t >> 5:1 return >> >> with: >> >> (defun g (x) (not (not x))) >> byte code: >> args: (x) >> 0 varref x >> 1 not >> 2 not >> 3 return >> >> (disassemble (byte-compile 'f)) Fascinating. Really, I'm serious. > > ... you mean 'g? > > Are you saying (not (not x)) generates more efficient > byte-code? I hate to break it to you, but the > Commodore 64 demo era is long gone :) I love to break it to you, but the C64 demoscene seems to be alive and kicking. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University