From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263849AbTD0IlL (ORCPT ); Sun, 27 Apr 2003 04:41:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263850AbTD0IlL (ORCPT ); Sun, 27 Apr 2003 04:41:11 -0400 Received: from mail6.home.nl ([213.51.128.20]:2957 "EHLO mail6-sh.home.nl") by vger.kernel.org with ESMTP id S263849AbTD0IlJ (ORCPT ); Sun, 27 Apr 2003 04:41:09 -0400 Message-ID: <3EAB99EE.30601@keyaccess.nl> Date: Sun, 27 Apr 2003 10:50:54 +0200 From: Rene Herman User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Linus Torvalds CC: Andi Kleen , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Alternative patching for prefetches & cleanup References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > That's not the fibonacci sequence, that's just a regular sigma(i) > (i=1..n) sequence. And if you were to generate the sequence numbers at > compile-time I might agree with you, if you also were to avoid using > inline asms. If the sigma(i) method is to stay, please note that sigma(1 <= i <= n | i) = n*(n+1) / 2 for all n > 0 (trivial proof by induction). That is, no need to loop; in this case, with n = num - 1 k = ((num - 1) * num) / 2 Rene.