Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932068AbVJ3Kqg (ORCPT ); Sun, 30 Oct 2005 05:46:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932074AbVJ3Kqg (ORCPT ); Sun, 30 Oct 2005 05:46:36 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55238 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S932068AbVJ3Kqf (ORCPT ); Sun, 30 Oct 2005 05:46:35 -0500 From: Andreas Schwab To: "J.A. Magallon" Cc: Russell King , Michal Srajer , Linux Kernel List Subject: Re: [PATCH] include/linux/etherdevice.h, kernel 2.6.14 References: <20051029141046.GA17715@ultra60.mat.uni.torun.pl> <20051029141757.GA14039@flint.arm.linux.org.uk> <20051029154027.GC17715@ultra60.mat.uni.torun.pl> <20051029160019.GB14039@flint.arm.linux.org.uk> <95B34D3D-B658-4933-81CF-4DA25BD0F37F@able.es> X-Yow: I invented skydiving in 1989! Date: Sun, 30 Oct 2005 11:46:27 +0100 In-Reply-To: <95B34D3D-B658-4933-81CF-4DA25BD0F37F@able.es> (J. A. Magallon's message of "Sat, 29 Oct 2005 23:36:57 +0200") Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 24 "J.A. Magallon" writes: > Just for curiosity, could you both benchmark this also: > > int is_zero_ether_addr0(const unsigned char *addr) > { > return !(((unsigned long *)addr)[0] | ((unsigned short*)addr)[2]); > } It's probably slower when addr is unaligned, especially when unaligned accesses need to be emulated. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra?e 5, 90409 N?rnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." - 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/