phobos src level stats

Bruce Carneal bcarneal at gmail.com
Tue Sep 22 20:53:17 UTC 2020


Below you'll find category line percentages and total line counts 
for the 20 biggest files in phobos.

The "line" counts following the file names are of the 
dscanner/libdparse variety rather than the 'wc' variety.

On a 2.4GhZ zen1, libdparse managed all of phobos in a little 
under 1.5 seconds.  For comparison note that all files were read 
in a little under 10 milliseconds (from file cache).

I really enjoyed my first interaction with libdparse but I'm 
guessing that the maintainers there strongly favor 
clarity/correctness over speed.  One other note, compiling with 
dub's --combined option cut the execution time of the 
ldc2/release exe by about 2X.


total bytes 10918340
empty 18%   comments  9%   docs 17%   utst 32%   src 24% 
range/package.d, 9610
empty 18%   comments  3%   docs 12%   utst 54%   src 13% 
datetime/systime.d, 9351
empty 18%   comments  3%   docs 16%   utst 52%   src 11% 
datetime/date.d, 8496
empty 12%   comments 10%   docs 19%   utst 18%   src 41% 
uni/package.d, 8335
empty 21%   comments  3%   docs 34%   utst 37%   src  6% 
datetime/interval.d, 8215
empty 13%   comments 13%   docs 17%   utst 24%   src 35% math.d, 
7679
empty 16%   comments  8%   docs 10%   utst 36%   src 30% 
format.d, 6920
empty 16%   comments  7%   docs 16%   utst 42%   src 19% 
traits.d, 6868
empty 17%   comments 11%   docs 18%   utst 35%   src 20% 
typecons.d, 6784
empty 16%   comments  4%   docs 19%   utst 32%   src 29% 
string.d, 5442
empty 19%   comments  9%   docs 14%   utst 35%   src 23% 
algorithm/iteration.d, 5235
empty 16%   comments 11%   docs 11%   utst 39%   src 23% conv.d, 
4939
empty 16%   comments  7%   docs 25%   utst 22%   src 30% stdio.d, 
4396
empty 14%   comments  6%   docs 43%   utst  6%   src 31% 
net/curl.d, 4167
empty 16%   comments  8%   docs 21%   utst 29%   src 26% 
algorithm/searching.d, 4074
empty 14%   comments  9%   docs 18%   utst 22%   src 36% 
algorithm/sorting.d, 4073
empty 20%   comments  4%   docs 23%   utst 25%   src 28% file.d, 
4071
empty 17%   comments  8%   docs 16%   utst 38%   src 22% array.d, 
3601
empty 20%   comments  9%   docs 29%   utst 12%   src 30% 
parallelism.d, 3594
empty 20%   comments  4%   docs 14%   utst 43%   src 19% 
bitmanip.d, 3457



More information about the Digitalmars-d mailing list