Hi, I support Colomban's commit, but I think that these macros make code hard to read. I therefore think we should only use them in places where performance actually matters. If the time saving is probably under a millisecond, we should not use them as it makes code harder to understand. Save them for inner loops IMO.
On Thu, 24 Mar 2011 22:00:18 +0000 [email protected] wrote: > Revision: 5625 > http://geany.svn.sourceforge.net/geany/?rev=5625&view=rev > Author: colombanw > Date: 2011-03-24 22:00:18 +0000 (Thu, 24 Mar 2011) > > Log Message: > ----------- > Improve usage of G_(UN)?LIKELY() > > G_(UN)?LIKELY() should be only used on whole conditional expressions, > and only if the branching is very highly predictable, not if it is only > more probable. > > These macros should be used with care because a wrong prediction may > be a lot worst than what a good prediction can give. Regards, Nick _______________________________________________ Geany-devel mailing list [email protected] https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
