lkml.org 
[lkml]   [2003]   [Apr]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [TRIVIAL] kstrdup
FromAlan Cox <>
Date19 Apr 2003 13:27:21 +0100
On Sad, 2003-04-19 at 05:48, Jeff Garzik wrote:
> > Completely disagree.  Write the most straightforward code possible,
> > and then if there proves to be a problem, optimize.  Optimizations
> > where there's no actual performance problem should be left to the
> > compiler.
> 
> Since the kernel does its own string ops, the compiler does not have 
> enough information to deduce that further optimization is possible.
> 
> 
> > Case in point: gcc-3.2 on -O2 on Intel is one instruction longer for
> > your version.
> 
> And?  It's still slower.

You are arguing over a 1 instruction, probably sub 1 clock scheduling
matter on a call which is not used on any fast or common path. If you
shaved 1 clock off the timer handling instead you'd make a lot more
difference..
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:34    [from the cache]
©2003-2008