cvs commit: src/sys/kern init_main.c kern_malloc.c md5c.c subr_autoconf.c subr_mbuf.c subr_prf.c tty_subr.c vfs_cluster.c vfs_subr.c

David Schultz das at FreeBSD.ORG
Wed Jul 23 00:36:04 PDT 2003


On Wed, Jul 23, 2003, Poul-Henning Kamp wrote:
> The algorithm I would like to see implemented as a pre-commit check
> for the __inline* keywords are:
> 
> 
> [1]	if (programmer thinks inline might be useful) {
> 		try compiling with inline;
> [2]		if (object code smaller) {
> 			/* inline is beneficial */
> 			commit it;
> 			return;
> 		} 
> 		run benchmark;
> [3]		if (code runs faster) {
> 			/* inline is beneficial */
> 			commit it;
> 			return;
> 		}
> 	}
> 	/* inline not proven beneficial */
> 	return;

I agree with your algorithm, as long as you're not going to beat
people over the head with it for every inline function until they
submit benchmarks.

Your cavalier attitude towards all this bothers me.  You presume
the right to make gratuitous changes to other people's code unless
they prove to your satisfaction that they were right in the first
place.  If you're going to go around and remove some inlines,
that's great; many of them are probably inappropriate.  But be
prepared to justify the changes if someone---particularly the
maintainer---objects.  ``It makes the object code bigger'' is not
justification in itself.


More information about the cvs-all mailing list