A large source file may be broken down into several smaller ones, making it easier to comprehend and maintain the whole.
Fewer recompilations may be needed when changing only one subunit.
Benefit 1 is purely source level so it is always available.
There are, however, also possible drawbacks to subunits:
Package and protected subunits present a code generation difficulty because they may introduce objects which need to exist until the parent's declarative region is left. In effect, the subunit objects should be part of the parent's frame yet they are not known when the code for that frame is generated.
The resulting code may be less compact and efficient with subunits than without because some optimizations may not be applied.
One way of overcoming both these drawbacks is to have the Ada compiler treat all subunits as if they were included in the parent source. This solution unfortunately eliminates benefit 2 all together. The handling in SCORE Ada is a compromise, intended to provide the benefits and avoid the drawbacks as far as possible.
Let us first look at package and protected subunits. The SCORE Ada compiler compiles all subunits as they are met but postpones code generation for the parent and package and protected subunits until all such subunits have been compiled. This eliminates the first possible drawback as these subunits do not exist at code generation time. Here code efficiency is retained at the possible expense of recompilation efficiency.
Subprogram and task subunits, on the other hand, are separately compiled so benefit 2 is preserved for them. For parents which are library packages you get the benefits and no drawbacks. For subprogram parents with subprogram or task subunits the price is drawback 2. The following discusses the actual price. When subunits are really compiled separately from their parent, the code generated for a subprogram parent must allow for the subunits referencing all local objects visible to them. This prevents some optimizations (e.g. keeping variables in registers). This also requires the parent unit to provide subunits with means of addressing its local objects. To this end, SCORE generates additional constants for the parent holding the frame offset of visible local objects and assumes that there will be references to these objects from the subunits and generates code to make its frame pointer available to the subunits (something that is analyzed on a per-subprogram basis in the absense of subprogram or task subunits). In addition, each actual reference to a local object of the parent incurs the overhead of loading the frame offset.
To recap: The resulting code is only affected if you have subprogram or task subunits in other subprograms, something you may want to take into account when you structure your Ada source code.