From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 9 14:57:22 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16F729A0 for ; Mon, 9 Feb 2015 14:57:22 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F25FACBE for ; Mon, 9 Feb 2015 14:57:21 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t19EvL7n049089 for ; Mon, 9 Feb 2015 14:57:21 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 135718] [patch] enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems Date: Mon, 09 Feb 2015 14:57:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pfg@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 14:57:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=135718 --- Comment #8 from Pedro F. Giffuni --- Created attachment 152798 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152798&action=edit Updated patch by Andrey Chernov I updated the testing utility with 4096 datapoints of random data and I did some very basic testing with an updated patch from Andrey : $ time ./test-heapsort 1..1 ok 1 - heapsort 27.83 real 27.61 user 0.00 sys $ time ./test-mergesort 1..1 ok 1 - mergesort 27.02 real 26.83 user 0.00 sys $ time ./test-qsort (old) 1..1 ok 1 - qsort 27.07 real 26.94 user 0.00 sys ... $ time ./test-qsort (new) 1..1 ok 1 - qsort 26.94 real 26.81 user 0.00 sys ___ IMHO. the performance improvements are measurable, and even when they may not seem huge, they are significant enough to make qsort preferable over heapsort and mergesort (at least for my particular dataset). -- You are receiving this mail because: You are the assignee for the bug.