[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: if vs. when vs. and: style question
From: |
tomas |
Subject: |
Re: if vs. when vs. and: style question |
Date: |
Fri, 27 Mar 2015 09:06:35 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Mar 27, 2015 at 08:59:25AM +0100, Gian Uberto Lauri wrote:
> Emanuel Berg writes:
> > (1+ data) vs. (+ 1 data)
>
> I miss the original discussion, my apologies.
>
> In C, increment and decrement operators are meant to use hw processor
> instructions.
>
> Is it the same for the LISP 1+ function?
That depends on the compiler. OTOH -- for a decent modern compiler, the
code generator would see the same, whether you type (+ 1 foo) or (1+ foo).
The optimizer is solving much harder problems than that. This holds true
for C as it holds for Lisp or Scheme or whatnot.
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlUVD4sACgkQBcgs9XrR2kbphwCeMf4sCMOHCa+AJIVqDUB5cGVl
8vgAn1/D8DdYNHNtvPtUpKS7DrpLdnKD
=koIq
-----END PGP SIGNATURE-----
- Re: if vs. when vs. and: style question, (continued)
- Message not available
- Re: if vs. when vs. and: style question, Pascal J. Bourguignon, 2015/03/25
- Re: if vs. when vs. and: style question, Eli Zaretskii, 2015/03/25
- Message not available
- Re: if vs. when vs. and: style question, Rusi, 2015/03/25
- Re: if vs. when vs. and: style question, Rusi, 2015/03/25
- Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/31
- Re: if vs. when vs. and: style question, Rusi, 2015/03/31
- Message not available
- Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/26
- Re: if vs. when vs. and: style question, Gian Uberto Lauri, 2015/03/27
- Re: if vs. when vs. and: style question,
tomas <=
- Re: if vs. when vs. and: style question, Gian Uberto Lauri, 2015/03/27
- Re: if vs. when vs. and: style question, tomas, 2015/03/27
- Re: if vs. when vs. and: style question, Gian Uberto Lauri, 2015/03/27
- Message not available
- Re: if vs. when vs. and: style question, Pascal J. Bourguignon, 2015/03/27
- Re: if vs. when vs. and: style question, tomas, 2015/03/27
- Message not available
- Re: if vs. when vs. and: style question, Rusi, 2015/03/27
- Re: if vs. when vs. and: style question, Pascal J. Bourguignon, 2015/03/27
- Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/26
- Re: if vs. when vs. and: style question, Gian Uberto Lauri, 2015/03/27
- Message not available
- Re: if vs. when vs. and: style question, Joost Kremers, 2015/03/27