Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polyglot slightly faster than loc #103

Closed
gnzlbg opened this issue Aug 22, 2018 · 3 comments
Closed

polyglot slightly faster than loc #103

gnzlbg opened this issue Aug 22, 2018 · 3 comments

Comments

@gnzlbg
Copy link

gnzlbg commented Aug 22, 2018

From: https://github.com/vmchale/polyglot

polyglot: 143.2 ms
loc: 171.8 ms
tokei: 304.6 ms

It might be interesting to look at which optimizations they are using.

@cgag
Copy link
Owner

cgag commented Aug 23, 2018

Hadn't seen this, definitely looks interesting. I'll have to look at what they do for figuring out filetypes when there's no extension as well.

from what i can tell poly doesn't handle multi-line comments, so only checking for // and not /* */ pairs in c for example, so it's doing less work there

@cgag
Copy link
Owner

cgag commented Aug 23, 2018

it's really making me want colorful output

@gnzlbg
Copy link
Author

gnzlbg commented Aug 23, 2018

I personally find the colorful output overkill for a line counting tool, but I can personally recommend the termcolor crate used by ripgrep - it is really nice.

@cgag cgag closed this as completed Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants