[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Counting words, fast!
From: |
Jesse Hathaway |
Subject: |
Re: Counting words, fast! |
Date: |
Tue, 16 Mar 2021 17:31:41 -0500 |
On Tue, Mar 16, 2021 at 5:19 PM Leonid Isaev (ifax)
<leonid.isaev@ifax.com> wrote:
> Nice, but I don't understand why did you choose to implement insertion sort
> in bash? Replacing it with GNU sort(1) significantly cuts down execution time:
I was following what I took as the spirit of the constraints:
https://benhoyt.com/writings/count-words/#problem-statement-and-constraints
which don't allow anything but a language's standard library. Surprisingly,
the bulk of the processing time is in reading of the file and constructing
the frequency associative array, not in the sorting.
- Counting words, fast!, Jesse Hathaway, 2021/03/16
- Re: Counting words, fast!, Leonid Isaev (ifax), 2021/03/16
- Re: Counting words, fast!, Greg Wooledge, 2021/03/16
- Re: Counting words, fast!,
Jesse Hathaway <=
- Re: Counting words, fast!, Dennis Williamson, 2021/03/16
- Re: Counting words, fast!, Jesse Hathaway, 2021/03/17
- Re: Counting words, fast!, Dennis Williamson, 2021/03/17
- Re: Counting words, fast!, Jesse Hathaway, 2021/03/17
- Re: Counting words, fast!, Greg Wooledge, 2021/03/17
- Re: Counting words, fast!, Jesse Hathaway, 2021/03/17
Re: Counting words, fast!, Koichi Murase, 2021/03/19