HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
ChrisPenner
wc
Haskell2019–2019
ChrisPenner / wc

wc

Beating unix `wc` in Haskell

3Distinct people
3Mentions
0Explicit recommenders
137GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Beating unix `wc` in Haskell

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week3 dated mentions

Observed mentions: 2019-10-10 13:08:44 UTC to 2019-11-20 22:08:50 UTC. Weeks start Monday, UTC.

012019-10-07 00:00:00 UTC to 2019-10-14 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsOct 72019-10-14 00:00:00 UTC to 2019-10-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-10-21 00:00:00 UTC to 2019-10-28 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-10-28 00:00:00 UTC to 2019-11-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsOct 282019-11-04 00:00:00 UTC to 2019-11-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-11-11 00:00:00 UTC to 2019-11-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-11-18 00:00:00 UTC to 2019-11-25 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 18

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 72019-10-07 00:00:00 UTC2019-10-14 00:00:00 UTC110
Oct 142019-10-14 00:00:00 UTC2019-10-21 00:00:00 UTC000
Oct 212019-10-21 00:00:00 UTC2019-10-28 00:00:00 UTC101
Oct 282019-10-28 00:00:00 UTC2019-11-04 00:00:00 UTC000
Nov 42019-11-04 00:00:00 UTC2019-11-11 00:00:00 UTC000
Nov 112019-11-11 00:00:00 UTC2019-11-18 00:00:00 UTC000
Nov 182019-11-18 00:00:00 UTC2019-11-25 00:00:00 UTC101

What Hacker News says

3 sources
>none of the ones I’ve read have posted the test sets up I think the earliest(?) entry[1] in this "series" (the one done in Haskell) had their test input shared alongside the source code, and it has been referenced in some others (often multiplied several times over, as the original isn't very big). Beyond that it's ASCII only, the contents matter little. >nobody seems to want to go to that much effort to get coherent comparisons I think nobody really wants to get any coherent comparisons, because this thing isn't really a competition between the entries themselves. [1]: https://github.com/ChrisPenner/wc (see data/big.txt)
In Beating C with 70 lines of Go
Some timings to show just how quickly Dyalog is improving, taken with the original function from OP and big.txt (https://github.com/ChrisPenner/wc/blob/master/data/big.txt) on a Kaby Lake i7. Dyalog releases about once a year, and 17.1 had almost no performance changes. 15.0: 93ms 16.0: 82ms 17.0: 7.4ms 17.1: 7.5ms 18.0: 5.3ms There's still more room for improvement: although arithmetic functions use AVX2 when available, functions based on SSSE3 shuffle don't yet. That includes Membership (∊) here, which takes the majority of the runtime in my improved version of wc and should be twice as fast with AVX2.
In Beating C with Dyalog APL

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.