lkml.org 
[lkml]   [2007]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v2] epoll use a single inode ...
Eric Dumazet wrote:
>
> For epoll, I suspect this is harmless : Programs dont allocate epolls fd
> every milli second, but at startup only.
>
> For pipes/sockets, using a 64 bits would be problematic, because
> sprintf() uses a divide for each digit. And a divide is slow. Ten
> divides are *very* slow.
>

That's true for *any* sprintf(), though. sprintf() converts all its
arguments to 64 bits.

However, this could be optimized. I think right now sprintf() uses a
generic divide-by-base, but a divide by 8 and 16 can of course be
handled with a shift, and divide by 10 can be replaced with a
multiplication by 0x1999999999999999ULL on most architectures.
-hpa
-
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: 2007-03-06 17:31    [from the cache]
©2003-2011 Jasper Spaans