microsoft / PQCrypto-SIDH
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 303 units with 7,394 lines of code in units (11.5% of code).
    • 11 very long units (2,605 lines of code)
    • 14 long units (858 lines of code)
    • 51 medium size units (1,687 lines of code)
    • 96 small units (1,401 lines of code)
    • 131 very small units (843 lines of code)
35% | 11% | 22% | 18% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c35% | 11% | 22% | 18% | 11%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/P75166% | 0% | 12% | 13% | 7%
src/P61060% | 0% | 14% | 16% | 8%
src19% | 10% | 24% | 25% | 20%
src/P50351% | 0% | 18% | 19% | 10%
src/P43445% | 0% | 20% | 21% | 12%
src/sha371% | 0% | 6% | 14% | 7%
src/compression6% | 37% | 35% | 15% | 5%
src/random0% | 0% | 87% | 0% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
401 186 1
void mp_mul()
in src/P751/AMD64/fp_x64.c
387 1 4
void rdc_mont()
in src/P751/AMD64/fp_x64.c
301 1 2
void mp_mul()
in src/P610/AMD64/fp_x64.c
283 1 4
void KeccakF1600_StatePermute()
in src/sha3/fips202.c
242 2 1
void rdc_mont()
in src/P610/AMD64/fp_x64.c
231 1 2
void mp_mul()
in src/P503/AMD64/fp_x64.c
195 1 4
void rdc_mont()
in src/P503/AMD64/fp_x64.c
169 1 2
void mp_mul()
in src/P434/AMD64/fp_x64.c
157 1 4
void rdc_mont()
in src/P434/AMD64/fp_x64.c
130 1 2
void Tate2_pairings()
in src/compression/pairing.c
109 11 4
void Tate3_pairings()
in src/compression/pairing.c
91 6 2
void Traverse_w_notdiv_e_fullsigned()
in src/compression/dlog.c
78 20 14
void from_base()
in src/compression/dlog.c
69 17 4
int ord2w_dloghyb()
in src/compression/dlog.c
69 20 4
62 4 2
static void FullIsogeny_A_dual()
in src/compression/sidh_compressed.c
59 5 4
static void Elligator2()
in src/compression/torsion_basis.c
56 8 5
static void PKBDecompression_extended()
in src/compression/sidh_compressed.c
55 2 5
static void PKBDecompression()
in src/compression/sidh_compressed.c
54 2 4