From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 14 21:53:48 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BC2416A492 for ; Thu, 14 Dec 2006 21:53:48 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9646B43E2E for ; Thu, 14 Dec 2006 21:48:38 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBELo6xf033559 for ; Thu, 14 Dec 2006 21:50:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBELo6wg033558; Thu, 14 Dec 2006 21:50:06 GMT (envelope-from gnats) Resent-Date: Thu, 14 Dec 2006 21:50:06 GMT Resent-Message-Id: <200612142150.kBELo6wg033558@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8A9916A407 for ; Thu, 14 Dec 2006 21:46:42 +0000 (UTC) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E4C043D5E for ; Thu, 14 Dec 2006 21:44:55 +0000 (GMT) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (aldan [127.0.0.1]) by aldan.algebra.com (8.13.8/8.13.7) with ESMTP id kBELkUeK024276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 14 Dec 2006 16:46:31 -0500 (EST) (envelope-from mi@aldan.algebra.com) Received: (from mi@localhost) by aldan.algebra.com (8.13.8/8.13.7/Submit) id kBELkUxO024275; Thu, 14 Dec 2006 16:46:30 -0500 (EST) (envelope-from mi) Message-Id: <200612142146.kBELkUxO024275@aldan.algebra.com> Date: Thu, 14 Dec 2006 16:46:30 -0500 (EST) From: "Mikhail T." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/106734: SSE2 optimization for bzip2/libbz2 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 21:53:48 -0000 >Number: 106734 >Category: bin >Synopsis: SSE2 optimization for bzip2/libbz2 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Dec 14 21:50:06 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: FreeBSD 6.2-PRERELEASE amd64 >Organization: Virtual Estates, Inc. >Environment: Intel's and AMD chips with SSE2 instructions. >Description: The patch below makes bzip2's blocksort routines use SSE2-registers to compare 16 bytes at a time. On both i386 and AMD chips I tested, the performance improvement ranges from 5% for the already compressed (.gz) files to 20% for the highly compressible system logs. The compressed files are byte-for-byte identical with those produced by the original bzip2. The changes are ifdef-ed by __SSE2__ and relies on the intrinsics available in GNU, Intel's, and Microsoft's compilers. No changes to Makefile(s) are necessary -- when targeting an SSE2-capable CPU (i.e. ``-march=opteron'' or ``-march=pentium4''), the __SSE2__ is set by the compiler. >How-To-Repeat: >Fix: The patch is available from http://aldan.algebra.com/~mi/bz/ The patch is not FreeBSD-specific, but was developed, tested, and timed on FreeBSD-6.x using both i386 and amd64. Feedback welcome. >Release-Note: >Audit-Trail: >Unformatted: