[Freeciv-Dev] Re: (PR#7279) Macro optimizations
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7279 >
On Mon, Jan 26, 2004 at 07:49:11PM -0800, Jason Short wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7279 >
>
> > [rwetmore@xxxxxxxxxxxx - Tue Jan 27 02:43:58 2004]:
>
> > If the maintainers have done their homework, understood ths issues,
> > presented all the arguments and with the concensus of the community
> > reached a decision to change core Freeciv standards or start a new
> > version written in C++, then that is fine.
>
> Do you think we'll get any consensus?
>
> Here are the code requirements I'd impose:
>
> 1. Each macro must evaluate each of its arguments exactly once.
> 2. No function-like macro should impose additional restrictions that a
> function would not. Specifically this refers to the sequence point
> problem.
> 3. Any macro that pretends to be a loop must respect "break".
> 4. Inlining should only be used when it gives a substantial improvement
> (in speed or code size) over macro or traditional function forms.
>
> These are all technical specifications. The point is that any macro
> that looks like a function or loop must _behave_ like a function or
> loop, so that the normal rules of C apply.
>
> #1 and #3 would require some fixes to existing macros. #1 may also
> preclude some current macros from being written in function form. #2
> and #4 are not currently a problem anywhere AFAIK.
>
> Discuss.
I want #4 reverted to read.
4. Macros should only be used when it gives a substantial improvement
(in speed or code size) over inlining or traditional function forms.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Understanding is a three-edged sword;
your side, their side, and the truth."
-- a well-known Vorlon
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, (continued)
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Jason Short, 2004/01/22
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Jason Short, 2004/01/22
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/22
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/23
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/25
- [Freeciv-Dev] Re: (PR#7279) Inline/Macro optimizations, Arnstein Lindgard, 2004/01/25
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/26
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/26
[Freeciv-Dev] Re: (PR#7279) Macro optimizations,
Raimar Falke <=
|
|