Re: invalid arguments to public API: g_assert, g_return_if_fail or continue with undefined behavior



On Tue, 2005-09-13 at 12:48 +0200, Christian Neumair wrote:
> I'd really like to have a GNOME-wide policy for dealing with public API
> and invalid arguments. If we feel like the traditional C route is good,
> we can remove all of these codeblocks for the sake of performance. I
> think some of the asserts/return_if_fail statements were left out for
> exactly that reason. I suppose this has a measurable performance impact
> for little helpers that are often called.

Has anyone done profiling on this?  There's no reason to turn these off
if they don't actually take up a noticeable percentage of time, memory
or disk space.

Perhaps we should do some profiling with and without these calls to see
if there's a difference?

Thanks,
    Chris




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