Skip to content

Instantly share code, notes, and snippets.

@MichaelTJones
Last active June 29, 2019 14:39
Show Gist options
  • Save MichaelTJones/ca0fd339401ebbe79b9cbb5044afcfe2 to your computer and use it in GitHub Desktop.
Save MichaelTJones/ca0fd339401ebbe79b9cbb5044afcfe2 to your computer and use it in GitHub Desktop.
Go Language Survey

Go Popularity Contest

A survey of the Go 1.13 source code tree.

Go survey

Processing summary

Count Units Detail
50 files source code groups
4191 files original source code files
1861357 lines 14762448 per sec
9788546 tokens 77633092 per sec
53577910 bytes 424927135 per sec
0.126087 seconds read/lex/tabulate/sort/select
36 workers (parallel speedup = 17.49 x with SMT)

Comment style popularity

Count Frequency Detail
248474 95.6696% line (//…'\n')
11247 4.3304% general (//)
259721 100.0000% total

String style popularity

Count Frequency Detail
197789 95.5133% quoted ("…")
9291 4.4867% raw (`…`)
207080 100.0000% total

Numeric base popularity

Count Frequency Detail
439329 52.2812% prefixed hexadecimal (/0[xX][0-9a-fA-F]+/)
398286 47.3970% decimal (/0|([1-9][0-9]*)/)
2692 0.3204% legacy octal (/0[0-7]+/)
12 0.0014% prefixed binary (/0[bB][0-1]+/)
840319 100.0000% total

Reserved keyword popularity

Count Frequency Detail
122941 26.9402% if
85797 18.8008% return
63671 13.9523% func
34873 7.6418% break
29502 6.4648% for
23488 5.1469% case
19791 4.3368% var
11962 2.6212% type
10860 2.3798% struct
9162 2.0077% range
7502 1.6439% else
5365 1.1756% const
4548 0.9966% switch
4191 0.9184% package
4088 0.8958% defer
3584 0.7854% continue
3312 0.7258% import
2966 0.6499% map
2366 0.5185% interface
2240 0.4909% default
1656 0.3629% chan
1280 0.2805% go
514 0.1126% goto
449 0.0984% select
178 0.0390% fallthrough
62 0.0136% try
456348 100.0000% total

Predefined type popularity

Count Frequency Detail
33318 16.3372% int
31310 15.3526% uintptr
24882 12.2007% string
20652 10.1266% byte
18168 8.9085% uint32
14458 7.0894% uint16
13696 6.7157% bool
12261 6.0121% int64
11041 5.4139% uint64
8817 4.3234% int32
5941 2.9131% uint8
2001 0.9812% float64
1993 0.9773% int8
1807 0.8860% uint
1671 0.8194% int16
1117 0.5477% rune
494 0.2422% float32
234 0.1147% complex128
78 0.0382% complex64
203939 100.0000% total

Other predefined popularity

Count Frequency Detail
46645 38.6720% nil
26633 22.0806% true
17741 14.7085% len
10227 8.4789% false
5129 4.2523% make
4838 4.0110% append
2798 2.3197% new
2053 1.7021% panic
1178 0.9766% print
933 0.7735% copy
543 0.4502% close
436 0.3615% iota
386 0.3200% cap
247 0.2048% delete
242 0.2006% println
233 0.1932% recover
148 0.1227% complex
105 0.0871% imag
102 0.0846% real
120617 100.0000% total

Operator popularity

Count Frequency Detail
930962 19.1409% ,
583231 11.9914% .
545516 11.2160% (
545516 11.2160% )
443619 9.1210% =
409363 8.4166% :
353023 7.2583% {
353023 7.2583% }
138595 2.8496% [
138595 2.8496% ]
78663 1.6173% !=
72111 1.4826% *
35812 0.7363% ==
29691 0.6105% -
28761 0.5913% &
27622 0.5679% +
24615 0.5061% &&
21700 0.4462% ;
16410 0.3374% |
15206 0.3126% !
10694 0.2199% <
9404 0.1933% <<
8100 0.1665% ||
7425 0.1527% >
6835 0.1405% ++
4481 0.0921% >>
3871 0.0796% +=
3542 0.0728% <=
3412 0.0702% >=
3035 0.0624% <-
2667 0.0548% /
1796 0.0369% |=
1767 0.0363% %
1257 0.0258% ^
1053 0.0217% --
779 0.0160% -=
284 0.0058% &^
262 0.0054% >>=
236 0.0049% *=
224 0.0046% ^=
188 0.0039% &^=
151 0.0031% &=
125 0.0026% <<=
100 0.0021% /=
12 0.0002% %=
4863734 100.0000% total

Identifier subtype

Count Frequency Detail
2821663 99.9986% ASCII-only
39 0.0014% Unicode
2821702 100.0000% total

Package name popularity

Count Frequency Detail
324 7.7309% runtime
279 6.6571% main
258 6.1560% unix
247 5.8936% syscall
182 4.3426% net
97 2.3145% ssa
77 1.8373% os
76 1.8134% gc
65 1.5509% p
60 1.4316% sys
50 1.1930% math
49 1.1692% runtime_test
43 1.0260% big
42 1.0021% types
37 0.8828% poll
35 0.8351% http
34 0.8113% cpu
34 0.8113% template
29 0.6920% route
29 0.6920% syntax
29 0.6920% windows
29 0.6920% x509
27 0.6442% ld
26 0.6204% race_test
24 0.5727% tls
20 0.4772% time
19 0.4534% rand
18 0.4295% json
18 0.4295% objabi
18 0.4295% os_test
17 0.4056% driver
17 0.4056% obj
1882 44.9058% (1882 more with 513 unique values)
4191 100.0000% total

ASCII Identifier popularity

Count Frequency Detail
104854 4.5910% v
72708 3.1835% err
51343 2.2480% Args
37261 1.6314% i
33517 1.4675% s
30302 1.3268% AddArg
26848 1.1755% e1
26434 1.1574% n
23410 1.0250% AuxInt
20934 0.9166% Op
17913 0.7843% error
16637 0.7284% v0
16009 0.7009% Pointer
14847 0.6501% Type
14243 0.6236% v_0
13610 0.5959% name
13596 0.5953% Errorf
12340 0.5403% value
11934 0.5225% _p0
11874 0.5199% want
11398 0.4991% Errno
11199 0.4903% lo
11143 0.4879% reset
11006 0.4819% Pos
10908 0.4776% v_1
10647 0.4662% typ
10311 0.4515% fn
9873 0.4323% in
9428 0.4128% hi
9111 0.3989% buf
8905 0.3899% NewValue0
8675 0.3798% Aux
1590704 69.6479% (1590704 more with 101302 unique values)
2283922 100.0000% total

Unicode Identifier popularity

Count Frequency Detail
8 20.5128% ŝ
8 20.5128% ε
4 10.2564% µs
4 10.2564% ΦExported
4 10.2564% χ2
3 7.6923% θ
2 5.1282% ΦType
2 5.1282% φType
2 5.1282% φUnexported
1 2.5641%
1 2.5641% À
39 100.0000% total

Rune constant popularity

Count Frequency Detail
508 4.6627% '0'
476 4.3690% '\n'
374 3.4328% ' '
349 3.2033% 'a'
327 3.0014% '.'
246 2.2579% 'A'
224 2.0560% '-'
221 2.0285% '/'
219 2.0101% 'x'
200 1.8357% 'g'
174 1.5971% '9'
173 1.5879% '"'
157 1.4410% '_'
148 1.3584% 'f'
146 1.3401% '\t'
140 1.2850% 'Z'
137 1.2575% '+'
129 1.1840% '\'
124 1.1381% ':'
122 1.1198% '\r'
121 1.1106% 'e'
113 1.0372% 'z'
111 1.0188% 'b'
107 0.9821% '*'
105 0.9637% 'm'
101 0.9270% '['
100 0.9179% '('
90 0.8261% ')'
88 0.8077% 'p'
86 0.7894% '='
84 0.7710% '''
83 0.7618% 'r'
5112 46.9206% (5112 more with 1708 unique values)
10895 100.0000% total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment