microsoft / PQCrypto-LWEKE
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 118 units with 2,403 lines of code in units (52.4% of code).
    • 1 very long units (242 lines of code)
    • 9 long units (616 lines of code)
    • 23 medium size units (775 lines of code)
    • 31 small units (444 lines of code)
    • 54 very small units (326 lines of code)
10% | 25% | 32% | 18% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c12% | 28% | 30% | 16% | 11%
py0% | 14% | 40% | 25% | 19%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/sha350% | 11% | 14% | 10% | 12%
src/sha3/keccak4x0% | 44% | 48% | 6% | <1%
src0% | 25% | 39% | 25% | 9%
src/aes0% | 33% | 0% | 32% | 34%
python30% | 14% | 40% | 25% | 19%
src/random0% | 0% | 87% | 0% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void KeccakF1600_StatePermute()
in src/sha3/fips202.c
242 2 1
size_t KeccakF1600times4_FastLoop_Absorb()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
96 5 6
size_t KeccakP1600times4_12rounds_FastLoop_Absorb()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
96 5 6
76 4 3
def kem_decaps()
in python3/frodokem.py
67 6 3
61 2 3
void KeccakP1600times4_ExtractAndAddLanesAll()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
59 6 5
static void keccak_absorb4x()
in src/sha3/fips202x4.c
55 6 8
53 5 2
53 5 2
int frodo_mul_add_as_plus_e()
in src/frodo_macrify_reference.c
50 11 4
int frodo_mul_add_sa_plus_e()
in src/frodo_macrify_reference.c
50 11 4
47 3 2
void KeccakP1600times4_ExtractLanesAll()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
45 6 4
def kem_encaps()
in python3/frodokem.py
41 2 2
void KeccakP1600times4_AddLanesAll()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
41 6 4
void KeccakP1600times4_OverwriteLanesAll()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
41 6 4
void KeccakP1600times4_ExtractAndAddBytes()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
35 8 6
def kem_keygen()
in python3/frodokem.py
33 4 1
def setParamsFrodo640()
in python3/frodokem.py
32 1 1