Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2021 13:35:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255840] __get_locale() is inefficient
Message-ID:  <bug-255840-227-CeHD06YSXP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255840-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255840-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255840

--- Comment #1 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3D71ec05a21257e159f40d54e26ad0011bb=
19b5134

commit 71ec05a21257e159f40d54e26ad0011bb19b5134
Author:     Cyril Zhang <cyril@freebsdfoundation.org>
AuthorDate: 2021-05-13 12:55:06 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-05-13 13:33:19 +0000

    sort: Cache value of MB_CUR_MAX

    Every usage of MB_CUR_MAX results in a call to __mb_cur_max.  This is
    inefficient and redundant.  Caching the value of MB_CUR_MAX in a global
    variable removes these calls and speeds up the runtime of sort.  For
    numeric sorting, runtime is almost halved in some tests.

    PR:             255551
    PR:             255840
    Reviewed by:    markj
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D30170

 usr.bin/sort/bwstring.c  | 54 ++++++++++++++++++++++++--------------------=
----
 usr.bin/sort/bwstring.h  |  9 ++++----
 usr.bin/sort/radixsort.c |  4 ++--
 usr.bin/sort/sort.c      |  6 +++++-
 usr.bin/sort/sort.h      |  6 ++++++
 5 files changed, 45 insertions(+), 34 deletions(-)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255840-227-CeHD06YSXP>