Energy-Languages icon indicating copy to clipboard operation
Energy-Languages copied to clipboard

Add 'Lines of Code' to listing

Open void4 opened this issue 7 years ago • 2 comments

It would be interesting to compare program complexity (of which LOC is some sort of measure) to the energy and time usage.

void4 avatar Aug 28 '18 22:08 void4

I agree, however, it would be good to measure only lines with code on them, not whitespace, documentation strings or just comments, to not penalize people who actually try to write readable code!

ScottPJones avatar Apr 23 '19 13:04 ScottPJones

Given the nature of the benchmarks, I'm not sure that LOC is a meaningful metric for them. However, if anyone is interested in trying this, the tokei tool can report total lines of code in various languages and differentiate between code, comments, and whitespace for most languages.

chipbuster avatar Mar 21 '22 07:03 chipbuster