emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows 64 port


From: Paul Eggert
Subject: Re: Windows 64 port
Date: Fri, 02 Mar 2012 12:35:38 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

On 03/02/2012 01:22 AM, Eli Zaretskii wrote:
> it is beyond ridiculous to say that a single extra clock cycle
> in a program such as Emacs should be seriously considered as an
> important factor to weigh against code cleanness and maintainability.

My primary objection to the change has always been maintainability
and cleanness; any extra instructions are in the noise.

ABLOCKS_BUSY is sometimes a pointer and sometimes an integer
(converted to a pointer).  At the point when this code is executed:

    int i = 0, aligned = (intptr_t) ABLOCKS_BUSY (abase);

ABLOCKS_BUSY is an integer.  Changing the code to look like this:

    int i = 0, aligned = (ABLOCKS_BUSY (abase) != NULL);

would cause a reader of the code to naturally make the
incorrect assumption that ABLOCKS_BUSY is a pointer.  On
this ground alone the patch is dubious.  The facts that
the patch is not needed for Windows 64 and that it might
slow things down a bit on some platforms are merely
icing on the cake.

I'm not saying the code can't be cleaned up -- it's pretty
messy and this one line is just one corner of the mess.  But
any cleanup can and should be done independently of the Windows 64
port, and should be systematic rather than just fiddling
with this one line and making this line inconsistent with
the (ab)use of ABLOCKS_BUSY in the rest of the module.

My compilation was an optimized one, not that this matters
much.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]