Rewriting the count_lines function #67

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

Faster and easier to read and understand, and higher performance.

UncleBill added some commits Nov 27, 2012

@UncleBill UncleBill Rewrite the count_lines for performance
Faster and easier to read and understand.
712b1b4
@UncleBill UncleBill Improve the count_lines fucntion
don't consider empty lines.
d1e8f07
Collaborator

ashb commented Jul 26, 2013

Sorry we missed this pull request when you first opened it.

Do you have the benchmarking code you used to test this? I can believe it would be faster but I'm curious to see by how much (and what difference it makes in various engines.)

Also /\n+/ should be /\n/ otherwise you don't count double empty lines correctly - but it looks like there aren't any tests for this yet. Our bad.

evilstreak closed this Aug 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment