novifinancial / curve25519-dalek-fiat
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 415 units with 3,762 lines of code in units (14.6% of code).
    • 1 very long units (110 lines of code)
    • 4 long units (225 lines of code)
    • 30 medium size units (828 lines of code)
    • 66 small units (974 lines of code)
    • 314 very small units (1,625 lines of code)
2% | 5% | 22% | 25% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs2% | 5% | 22% | 25% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/backend/vector/ifma24% | 0% | 8% | 45% | 22%
src/backend/vector/scalar_mul0% | 56% | 37% | 5% | 0%
src/backend/serial/scalar_mul0% | 53% | 41% | 5% | 0%
src0% | 0% | 18% | 26% | 55%
src/backend/vector/avx20% | 0% | 43% | 20% | 35%
src/backend/serial/u320% | 0% | 40% | 20% | 39%
src/backend/serial/u640% | 0% | 16% | 23% | 60%
benches0% | 0% | 17% | 44% | 38%
src/backend/serial/curve_models0% | 0% | 0% | 35% | 64%
src/backend/serial/fiat0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
110 3 2
63 8 2
59 8 2
52 8 4
51 8 4
40 1 5
39 2 1
38 1 3
36 1 2
33 3 2
31 3 2
31 5 2
31 1 1
31 1 0
30 1 2
30 1 1
29 1 3
27 1 0
27 5 2
27 2 1
26 3 2
25 3 1
24 1 2
24 2 0
24 2 0
24 3 1
24 3 1
23 1 1
23 1 5
22 1 0
22 2 0
22 3 1
22 3 1
22 1 4
21 1 4
20 1 0
20 4 2
20 4 0
20 2 2
19 1 0
19 3 0
19 1 1
19 1 1
19 1 1
19 1 2
18 3 2
18 1 2
18 1 1
18 4 0
18 1 2