awslabs / bike-kem
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 130 units with 2,233 lines of code in units (63.2% of code).
    • 1 very long units (241 lines of code)
    • 1 long units (58 lines of code)
    • 27 medium size units (820 lines of code)
    • 53 small units (784 lines of code)
    • 48 very small units (330 lines of code)
10% | 2% | 36% | 35% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c12% | 2% | 35% | 37% | 11%
h0% | 0% | 47% | 12% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/third_party_src74% | 0% | 7% | 9% | 9%
src/random0% | 12% | 37% | 42% | 7%
src/gf2x0% | 0% | 40% | 52% | 7%
include/internal0% | 0% | 47% | 12% | 39%
src0% | 0% | 63% | 22% | 13%
src/decode0% | 0% | 38% | 40% | 21%
src/common0% | 0% | 30% | 34% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static void KeccakF1600_StatePermute()
in src/third_party_src/fips202.c
241 2 1
_INLINE_ ret_t sha_update()
in src/random/sha.c
58 6 3
ret_t decode()
in src/decode/decode.c
46 4 3
_INLINE_ void gf2x_mul4_int()
in src/gf2x/gf2x_mul_base_pclmul.c
42 1 5
_INLINE_ void gf2x_ctx_init()
in include/internal/gf2x_internal.h
41 5 1
39 3 3
_INLINE_ void gf2x_mul8_512_int()
in src/gf2x/gf2x_mul_base_vpclmul.c
38 1 4
_INLINE_ uint8_t print_last_block()
in src/common/utilities.c
37 10 3
void secure_set_bits_avx512()
in src/random/sampling_avx512.c
36 7 4
void secure_set_bits_avx2()
in src/random/sampling_avx2.c
36 7 4
void gf2x_mul_base_port()
in src/gf2x/gf2x_mul_base_portable.c
35 3 3
_INLINE_ void find_err1()
in src/decode/decode.c
34 6 7
ret_t sha()
in src/random/sha.c
34 7 3
_INLINE_ void karatzuba()
in src/gf2x/gf2x_mul.c
34 3 7
void gf2x_mod_inv()
in src/gf2x/gf2x_inv.c
33 5 2
void gf2x_mul_base_pclmul()
in src/gf2x/gf2x_mul_base_pclmul.c
29 2 3
ret_t aes256_key_expansion()
in src/random/aes.c
28 2 2
28 1 2
void secure_set_bits_port()
in src/random/sampling_portable.c
25 4 4
_INLINE_ uint32_t secure_l32_mask()
in include/internal/utilities.h
25 2 2