Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on look(1): lines beginning with given string. Parent comment
Ignoring memory hierarchy, naturally 'look' would be O(log n) while grep would be O(n).
Special input (sorted in this case) of course often calls for matching algorithms, when speed matters.
There are no comments on this comment yet.
Ignoring memory hierarchy, naturally 'look' would be O(log n) while grep would be O(n).
Special input (sorted in this case) of course often calls for matching algorithms, when speed matters.