API : constness ?

Tim Roberts timr at probo.com
Tue Jun 1 02:40:16 CEST 2004


Benoît Dejean <bnet at ifrance.com> wrote:

>Le Mon, 31 May 2004 11:56:57 +1000, Delaney, Timothy C (Timothy) a
>écrit :
>
>> Benoît Dejean wrote:
>
>>> static const char * const kwlist[] = { "uri", "open_mode", "exclusive",
>>> "perm", NULL };
>> 
>> Does this give any performance or size improvement?
>
>of course, it avoids a lot of relocation, reduces load time, and manque
>the compiler to make further informations because data will be in a
>readonly segment.

The data MAY be in a read-only segment, but even assuming that it is, that
doesn't do anything to reduce relocation or load time.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list