apple / swift-numerics
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 92 units with 305 lines of code in units (11.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 0 small units (0 lines of code)
    • 92 very small units (305 lines of code)
0% | 0% | 0% | 0% | 100%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
h0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Sources/_NumericsShims/include0% | 0% | 0% | 0% | 100%
Sources/ComplexModule0% | 0% | 0% | 0% | 100%
Sources/_TestSupport0% | 0% | 0% | 0% | 100%
Sources/IntegerUtilities0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func _derivativeImaginary()
in Sources/ComplexModule/Complex+Differentiable.swift
8 1 0
HEADER_SHIM float libm_hypotf()
in Sources/_NumericsShims/include/_NumericsShims.h
8 1 2
func _derivativeConjugate()
in Sources/ComplexModule/Complex+Differentiable.swift
6 1 0
func sum()
in Sources/_TestSupport/DoubleWidth.swift
6 3 3
func _derivativeReal()
in Sources/ComplexModule/Complex+Differentiable.swift
5 1 0
func euclideanDivision()
in Sources/IntegerUtilities/DivideWithRounding.swift
5 2 2
HEADER_SHIM float libm_exp10f()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 1
HEADER_SHIM float libm_lgammaf()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 2
HEADER_SHIM double libm_exp10()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 1
HEADER_SHIM double libm_lgamma()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 2
HEADER_SHIM long double libm_lgammal()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 2
HEADER_SHIM float _numerics_muladdf()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 3
HEADER_SHIM double _numerics_muladd()
in Sources/_NumericsShims/include/_NumericsShims.h
4 1 3
func mul()
in Sources/_TestSupport/DoubleWidth.swift
4 1 2
init()
in Sources/_TestSupport/Interval.swift
4 1 1
HEADER_SHIM float libm_cosf()
in Sources/_NumericsShims/include/_NumericsShims.h
3 1 1
HEADER_SHIM float libm_sinf()
in Sources/_NumericsShims/include/_NumericsShims.h
3 1 1
HEADER_SHIM float libm_tanf()
in Sources/_NumericsShims/include/_NumericsShims.h
3 1 1
HEADER_SHIM float libm_acosf()
in Sources/_NumericsShims/include/_NumericsShims.h
3 1 1
HEADER_SHIM float libm_asinf()
in Sources/_NumericsShims/include/_NumericsShims.h
3 1 1