GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] ANSI-fication (was: RE: [Patches] fix simple 64-bit warnings/errorsin signalmodule.c and bufferobject.c)

[Python-Dev] ANSI-fication (was: RE: [Patches] fix simple 64-bit warnings/errorsin signalmodule.c and bufferobject.c)

Fredrik Lundh [email protected]
Wed, 7 Jun 2000 12:24:46 +0200

  • Previous message: [Python-Dev] ANSI-fication (was: RE: [Patches] fix simple 64-bit warnings/errorsin signalmodule.c and bufferobject.c)
  • Next message: [Python-Dev] ANSI-fication (was: RE: [Patches] fix simple 64-bit warnings/errorsin signalmodule.c and bufferobject.c)
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

MAL wrote:
> > (btw, what are all those "register" declarations doing in MAL's
> > version of unicodeobject.c?  does any modern compiler even
> > care about that keyword?)
>=20
> "register" helps compilers in situations where normal
> optimizations don't give satisfying results, e.g. to aid
> in keeping often used variables or counters in registers
> rather than on the stack. It can also help with inling
> functions and can speed up parameter passing.

Yeah, I know what register is supposed to do.

But common knowledge (at least where I live) is that modern optimizers
know better than you, and usually ignore "register" altogether if you =
use
higher optimization levels... (and if they don't, using "register" is =
likely to
make things worse on some platforms).  In other words, "register" should
not be used in portable code.

fwiw, a certain Linux kernel hacker seem to agree with me on that one:

    http://www2.linuxjournal.com/lj-issues/issue17/1138.html
    ...
    #define register
    ...
    "Gcc, the normal Linux C compiler, understands the register keyword,
    but the code optimiser is sufficiently good that using register is =
normally
    a bad idea."
    ...

(If it's good enough for Alan Cox etc).

But never mind.  I doubt that removing them would matter on any con-
temporary platform, but on the other hand, keeping them in there won't
hurt much either.  It just makes the source code a little bit more ver-
bose than it has to be...

</F>




  • Previous message: [Python-Dev] ANSI-fication (was: RE: [Patches] fix simple 64-bit warnings/errorsin signalmodule.c and bufferobject.c)
  • Next message: [Python-Dev] ANSI-fication (was: RE: [Patches] fix simple 64-bit warnings/errorsin signalmodule.c and bufferobject.c)
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.