From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965972AbXCFROn (ORCPT ); Tue, 6 Mar 2007 12:14:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965971AbXCFROn (ORCPT ); Tue, 6 Mar 2007 12:14:43 -0500 Received: from terminus.zytor.com ([192.83.249.54]:45159 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965974AbXCFROm (ORCPT ); Tue, 6 Mar 2007 12:14:42 -0500 Message-ID: <45EDA15F.5090805@zytor.com> Date: Tue, 06 Mar 2007 09:14:07 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 1.5.0.9 (X11/20070212) MIME-Version: 1.0 To: Linus Torvalds CC: Eric Dumazet , Davide Libenzi , Linux Kernel Mailing List , Andrew Morton Subject: Re: [patch v2] epoll use a single inode ... References: <45ECD122.6020907@zytor.com> <45ECD3D4.5020305@zytor.com> <45ED08A9.9050501@cosmosbay.com> <45ED96A6.3000704@zytor.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > >> 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. > > Nope. You need both the result of the division *and* the remainder, and > you can't do that with a single multiply. Oh, right. *D'oh*. -hpa