[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19896: 23.1; reverse-region is slow compared to sort-columns
From: |
Ivan Shmakov |
Subject: |
bug#19896: 23.1; reverse-region is slow compared to sort-columns |
Date: |
Wed, 18 Feb 2015 18:29:08 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>>>>> asparagus <asparagus@comcast.net> writes:
> The emacs manual recommends 'M-x reverse-region' as a companion to
> 'M-x sort-columns' to achieve a descending-order column sort.
This could be a bug in the manual, as sort-columns has an
optional (prefix) ‘reverse’ argument since at least 1990
(d32200ac.)
> However, for large regions (> 100k lines), 'M-x reverse-region' is
> noticeably slower than 'M-x sort-columns', making descending sort
> much slower than ascending sort.
I don’t seem to see this on the current master; at a glance,
M-x reverse-region takes less time to complete than
M-x sort-columns.
The current stable version of Emacs is 24.4, with the pretest
for 24.5 being available since 17th [1]. Could you please check
if this issue also manifests with either of these versions?
TIA.
[1] news:87mw4c6gjn.fsf@petton.fr
http://permalink.gmane.org/gmane.emacs.devel/183187
> A workaround on linux: use 'C-u M-x shell-command-on-region' with tac
> (the opposite of cat) instead of using 'M-x reverse-region'.
On a GNU system (as well as on any other system featuring
GNU Coreutils), it should be possible to just use sort(1) for
the purpose. For instance, the “reverse” option is ‘-r’.
[…]
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A