[Bug 255551] FreeBSD sort much slower than GNU or NetBSD
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 May 2021 14:11:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255551
--- Comment #10 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=df40dcbf7c794f5448c13e23670466658a620933
commit df40dcbf7c794f5448c13e23670466658a620933
Author: Cyril Zhang <cyril@freebsdfoundation.org>
AuthorDate: 2021-05-13 12:55:06 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-05-20 13:15:43 +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
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30170
(cherry picked from commit 71ec05a21257e159f40d54e26ad0011bb19b5134)
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(-)
--
You are receiving this mail because:
You are the assignee for the bug.