Skip to content

Instantly share code, notes, and snippets.

@MichaelTJones
Last active June 29, 2019 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelTJones/609589e05017da4be52bc2810e9df4e8 to your computer and use it in GitHub Desktop.
Save MichaelTJones/609589e05017da4be52bc2810e9df4e8 to your computer and use it in GitHub Desktop.
Survey of Go Corpus

Go Popularity Contest

Processing summary

Count Units Detail
176 files source code groups
62780 files original source code files
22927078 lines 14113033 per sec
116926048 tokens 71975208 per sec
752311514 bytes 463094224 per sec
1.624532 seconds read/lex/tabulate/sort/select
36 workers (parallel speedup = 26.01 x with SMT)

Comment style popularity

Count Frequency Detail
3422773 99.0451% line (//…'\n')
32999 0.9549% general (//)
3455772 100.0000% total

String style popularity

Count Frequency Detail
2302095 85.8271% quoted ("…")
380153 14.1729% raw (`…`)
2682248 100.0000% total

Numeric base popularity

Count Frequency Detail
6739341 66.0843% prefixed hexadecimal (/0[xX][0-9a-fA-F]+/)
3372234 33.0673% decimal (/0|([1-9][0-9]*)/)
86524 0.8484% legacy octal (/0[0-7]+/)
10198099 100.0000% total

Reserved keyword popularity

Count Frequency Detail
1512573 24.8721% if
1412316 23.2235% return
998226 16.4144% func
247434 4.0687% var
232576 3.8244% type
225199 3.7031% for
210150 3.4556% struct
206891 3.4020% case
204548 3.3635% else
160141 2.6333% map
126211 2.0754% range
116633 1.9179% interface
62780 1.0323% package
58152 0.9562% import
57749 0.9496% defer
49013 0.8059% const
46686 0.7677% switch
42651 0.7013% break
32658 0.5370% default
27348 0.4497% continue
23137 0.3805% chan
9900 0.1628% go
9456 0.1555% goto
7421 0.1220% select
1312 0.0216% fallthrough
251 0.0041% try
6081412 100.0000% total

Predefined type popularity

Count Frequency Detail
773364 29.6623% string
376123 14.4262% int
263028 10.0884% byte
233853 8.9694% uintptr
177979 6.8264% bool
143590 5.5074% uint32
130405 5.0017% uint64
129948 4.9841% int64
109921 4.2160% int32
54468 2.0891% uint8
51320 1.9684% uint16
49916 1.9145% float64
36003 1.3809% uint
26618 1.0209% float32
20218 0.7755% int8
17527 0.6722% int16
7924 0.3039% rune
2594 0.0995% complex128
2427 0.0931% complex64
2607226 100.0000% total

Other predefined popularity

Count Frequency Detail
1103434 57.2682% nil
243959 12.6615% len
152229 7.9007% false
147765 7.6690% true
109276 5.6714% make
77742 4.0348% append
28288 1.4681% panic
25702 1.3339% new
15590 0.8091% copy
6136 0.3185% close
5154 0.2675% delete
4060 0.2107% iota
3958 0.2054% cap
1272 0.0660% recover
1010 0.0524% print
592 0.0307% println
309 0.0160% complex
187 0.0097% real
119 0.0062% imag
1926782 100.0000% total

Operator popularity

Count Frequency Detail
11434353 19.7392% ,
7476284 12.9063% (
7476284 12.9063% )
7159566 12.3596% .
4276308 7.3822% =
4078188 7.0402% {
4078188 7.0402% }
3993597 6.8942% :
1524982 2.6326% *
1291270 2.2291% [
1291270 2.2291% ]
772657 1.3338% !=
440894 0.7611% &
417255 0.7203% -
358688 0.6192% +
329519 0.5689% ==
323103 0.5578% ;
128324 0.2215% <<
125662 0.2169% <
118237 0.2041% &&
113172 0.1954% ++
111452 0.1924% >
111081 0.1918% !
101088 0.1745% |
99113 0.1711% +=
64789 0.1118% >=
62013 0.1071% ||
35318 0.0610% <-
29493 0.0509% >>
26937 0.0465% |=
24193 0.0418% <=
15832 0.0273% /
8608 0.0149% %
6458 0.0111% --
5971 0.0103% -=
5654 0.0098% ^
3083 0.0053% *=
2609 0.0045% ^=
2052 0.0035% >>=
753 0.0013% &=
747 0.0013% /=
739 0.0013% &^
711 0.0012% <<=
625 0.0011% &^=
99 0.0002% %=
57927219 100.0000% total

Identifier subtype

Count Frequency Detail
31883068 99.9842% ASCII-only
5036 0.0158% Unicode
31888104 100.0000% total

Package name popularity

Count Frequency Detail
4072 6.4861% unix
2840 4.5237% main
943 1.5021% client
636 1.0131% api
541 0.8617% proto
524 0.8347% types
506 0.8060% v1
502 0.7996% elastic
450 0.7168% cmd
416 0.6626% storage
414 0.6594% codec
398 0.6340% common
389 0.6196% system
377 0.6005% dns
368 0.5862% http2
368 0.5862% internal
362 0.5766% util
338 0.5384% github
334 0.5320% pflag
317 0.5049% v1beta1
309 0.4922% fake
302 0.4810% logrus
291 0.4635% command
288 0.4587% ssh
278 0.4428% dbus
275 0.4380% sarama
256 0.4078% transport
248 0.3950% metrics
246 0.3918% leveldb
242 0.3855% yaml
233 0.3711% bolt
232 0.3695% netlink
44485 70.8586% (44485 more with 3981 unique values)
62780 100.0000% total

ASCII Identifier popularity

Count Frequency Detail
1386354 5.3394% err
589191 2.2692% s
540852 2.0830% c
408585 1.5736% _
408487 1.5732% i
401327 1.5457% v
384287 1.4800% t
295167 1.1368% r
261084 1.0055% m
227109 0.8747% e1
186929 0.7199% n
181422 0.6987% fmt
180354 0.6946% e
171171 0.6592% l
163746 0.6306% x
151336 0.5829% Pointer
151311 0.5828% unsafe
140786 0.5422% f
134669 0.5187% Errorf
134383 0.5176% z
125936 0.4850% this
124779 0.4806% iNdEx
124179 0.4783% out
119433 0.4600% req
110837 0.4269% _p0
101457 0.3908% res
100256 0.3861% ok
94869 0.3654% Name
94192 0.3628% String
91197 0.3512% cr
91130 0.3510% in
89667 0.3453% w
18198159 70.0882% (18198159 more with 480524 unique values)
25964641 100.0000% total

Unicode Identifier popularity

Count Frequency Detail
4702 93.3678% Ω
141 2.7998% ƒ
47 0.9333% ε
34 0.6751% α
19 0.3773% int1ϕ
19 0.3773% ϕ
9 0.1787% baseΔV
9 0.1787% int2ϕ
7 0.1390% baseΔT
6 0.1191% Δλ
6 0.1191% Δφ
5 0.0993% β
4 0.0794% γ
4 0.0794% φ1
4 0.0794% φ2
3 0.0596% ayϕ
3 0.0596% byϕ
3 0.0596% δs
3 0.0596% φ
2 0.0397% Aוההקלדה
2 0.0397% Ændret
2 0.0397% Позната
2 0.0397% 文本
5036 100.0000% total

Rune constant popularity

Count Frequency Detail
4330 4.5467% '\n'
3217 3.3780% ' '
3197 3.3570% '0'
2682 2.8163% 'a'
2572 2.7007% '"'
2406 2.5264% '\'
2269 2.3826% '.'
2260 2.3731% '-'
2124 2.2303% 'A'
1792 1.8817% '9'
1535 1.6118% '/'
1464 1.5373% 'Z'
1343 1.4102% ':'
1306 1.3714% 'f'
1258 1.3210% 'z'
1202 1.2622% '_'
1165 1.2233% 'e'
1164 1.2223% '''
1149 1.2065% '['
1146 1.2034% ','
1137 1.1939% '\r'
1112 1.1677% 'n'
1076 1.1299% '\t'
1034 1.0858% 't'
951 0.9986% 'r'
899 0.9440% '{'
873 0.9167% '>'
860 0.9030% ']'
837 0.8789% '#'
831 0.8726% 'U'
803 0.8432% '+'
779 0.8180% '}'
44460 46.6855% (44460 more with 2191 unique values)
95233 100.0000% total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment