microsoft / FourQlib
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 547 units with 10,751 lines of code in units (50.3% of code).
    • 17 very long units (2,234 lines of code)
    • 16 long units (1,118 lines of code)
    • 116 medium size units (3,717 lines of code)
    • 132 small units (2,003 lines of code)
    • 266 very small units (1,679 lines of code)
20% | 10% | 34% | 18% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c24% | 11% | 34% | 17% | 11%
h8% | 5% | 35% | 22% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
FourQ_ARM_NEON/ARM55% | 18% | 12% | 9% | 4%
FourQ_64bit_and_portable30% | 11% | 32% | 13% | 11%
sha51269% | 0% | 18% | 11% | 0%
FourQ_32bit9% | 11% | 42% | 22% | 14%
FourQ_ARM9% | 10% | 41% | 21% | 15%
FourQ_ARM_NEON10% | 6% | 47% | 18% | 17%
FourQ_ARM_side_channel9% | 15% | 39% | 22% | 14%
FourQ_32bit/generic0% | 0% | 49% | 25% | 24%
FourQ_64bit_and_portable/generic0% | 0% | 40% | 30% | 29%
FourQ_64bit_and_portable/AMD640% | 0% | 38% | 34% | 26%
FourQ_ARM/ARM0% | 0% | 34% | 25% | 40%
FourQ_ARM_side_channel/ARM0% | 0% | 34% | 25% | 40%
FourQ_64bit_and_portable/ARM640% | 0% | 24% | 31% | 43%
random0% | 0% | 92% | 0% | 8%
FourQ_ARM/libopencm30% | 0% | 0% | 0% | 100%
FourQ_ARM_side_channel/libopencm30% | 0% | 0% | 0% | 100%
FourQ_ARM/random0% | 0% | 0% | 0% | 100%
FourQ_ARM_side_channel/random0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
ECCRYPTO_STATUS HashToCurve()
in FourQ_64bit_and_portable/hash_to_curve.c
196 1 2
void v2muladdsub1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
151 1 7
151 2 3
void v2muldblsub1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
146 1 6
void v2muladd1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
136 1 6
void v2mulsub1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
136 1 6
void mul_truncate_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
129 1 3
void v2sqraddsub1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
128 1 6
bool ecc_mul_double()
in FourQ_32bit/eccp2.c
124 20 4
bool ecc_mul_double()
in FourQ_ARM/eccp2.c
124 20 4
bool ecc_mul_double()
in FourQ_ARM_NEON/eccp2.c
124 20 4
bool ecc_mul_double()
in FourQ_64bit_and_portable/eccp2_core.c
121 20 4
void v2mul1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
120 1 3
void table_lookup_1x8()
in FourQ_64bit_and_portable/table_lookup.h
117 6 4
bool ecc_mul_double()
in FourQ_ARM_side_channel/eccp2.c
116 19 4
void v2sqradd1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
113 1 5
void table_lookup_fixed_base()
in FourQ_64bit_and_portable/table_lookup.h
102 6 4
void v2sqr1271_a()
in FourQ_ARM_NEON/ARM/fp2_1271_NEON.c
94 1 2
ECCRYPTO_STATUS decode()
in FourQ_ARM_NEON/crypto_util.c
80 8 2
ECCRYPTO_STATUS decode()
in FourQ_32bit/crypto_util.c
77 8 2