Gary Coady wrote:
> Oops, I tend to feel like that most times! I tend to feel that if we
> have extremely good compilation tools, then those tools should be able
> to do the inlining and optimisation far better than I could. That's the
> theory anyway :) And there's always a tradeoff with inlining between
> speed and memory bloat (which may sometimes be no tradeoff if swap
> starts getting involved...)
<mild rant>
This is something that often annoys me. Programmers can spend hours inlining
code and relying on optimisation tools to improve performance. The best
performance improvement can be obtained by fixing the algorithm.
Most function calls get made very rarely. Optimising them often makes no
sense, produces illegable code and nonsense algorithms.
Inlining will help in functions that get called frequently and are small -
such as string manipulation routines. But these are a small part of most
applications.
One example I frequently see is people optimising a database function call.
Most database accesses involve many abstraction layers and millions of
instruction cycles. Trying to save a few instruction cycles would be a cost
saving of, say, 5 seconds in 20 hours.
But a simple hashmap cache of common data without any compiler or inline
optimisations can turn that same 20 hours into 10 minutes.
</mild rant>
- Matthew (who really should be writing code)
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
Irish Linux Users' Group: ilug@linux.ie
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster@linux.ie

from localhost (localhost [127.0.0.1])
	by phobos.labs.netnoteinc.com (Postfix) with ESMTP id 5DC63440CF
	for <jm@localhost>; Fri,  9 Aug 2002 10:20:58 -0400 (EDT)
from phobos [127.0.0.1]
	by localhost with IMAP (fetchmail-5.9.0)
	for jm@localhost (single-drop); Fri, 09 Aug 2002 15:20:58 +0100 (IST)
from webnote.net (mail.webnote.net [193.120.211.219]) by
    dogma.slashnull.org (8.11.6/8.11.6) with ESMTP id g79EJ8b06055 for
    <jm-ilug@jmason.org>; Fri, 9 Aug 2002 15:19:08 +0100
from lugh.tuatha.org (root@lugh.tuatha.org [194.125.145.45]) by
    webnote.net (8.9.3/8.9.3) with ESMTP id JAA04583 for <jm-ilug@jmason.org>;
    Fri, 9 Aug 2002 09:44:59 +0100
from lugh (root@localhost [127.0.0.1]) by lugh.tuatha.org
    (8.9.3/8.9.3) with ESMTP id JAA30120; Fri, 9 Aug 2002 09:42:13 +0100
from homer.jinny.ie ([193.120.171.3]) by lugh.tuatha.org
    (8.9.3/8.9.3) with ESMTP id JAA30091 for <ilug@linux.ie>; Fri,
    9 Aug 2002 09:42:08 +0100
from jlooney.jinny.ie (fw [193.120.171.2]) by homer.jinny.ie
    (8.9.3/8.11.2) with ESMTP id JAA29002 for <ilug@linux.ie>; Fri,
    9 Aug 2002 09:41:37 +0100
(from john@localhost) by jlooney.jinny.ie (8.11.6/8.11.6) id
    g798g0c28328 for ilug@linux.ie; Fri, 9 Aug 2002 09:42:00 +0100
From ilug-admin@linux.ie  Fri Aug  9 15:21:07 2002