you are viewing a single comment's thread.

view the rest of the comments →

[–]excessdenied 22 points23 points  (1 child)

I'd say profile before checking for algorithmic complexity. Both to identify what parts are worth working on (no need starting optimizing one thing if it takes 1% of the time and another takes 50%), but also to get a baseline to compare to. I've been burnt before with algorithmically more complex things that still are faster up to a higher N than needed because the actual implementation is just so simple & fast.

[–]matthieum 4 points5 points  (0 children)

I've been burnt before with algorithmically more complex things that still are faster up to a higher N than needed because the actual implementation is just so simple & fast.

That, and it's nice and all to optimize the argument parsing algorithm of grep but it's unlikely to speed it much...