On Mon, May 27, 2002 at 01:28:13AM -0400, Calin A. Culianu wrote:
> > Robert
> > ¹ There are surely small things which cannot be implemented in
> > another way - try to write a counting loop in another way than
> > for (i=0; i<N; i++) {printf(i);}
> void loopie(int N)
> {
> if (N) loopie(N-1);
> printf("%d ",N);
> }
" ... cannot be [sensibly] implemented in another way ... "
As somebody else pointed out, a good optimizer should be able to
unroll most types of loops / functions. With sufficient capabilities,
an optimizer should turn both of the above into the same object code
(potentially a faster executing version, or a tighter set of
instructions, than either of the above, unoptimized).
But then again... this whole thread-line is a little off-topic... we
all know it is the better lawyer who wins, not the developer who can
deduce the potential origin of a piece of code... :-)
mark
-- mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, CanadaOne ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them...
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri May 31 2002 - 22:00:21 EST