To supplement ShreevatsaR excellent answer, here is the beginning of tex.p, the “tangled” form of tex.web
{4:}{9:}{$C-,A+,D-}{[$C+,D+]}{:9}program TEX;label{6:}1,9998,9999;
{:6}const{11:}memmax=30000;memmin=0;bufsize=500;errorline=72;
halferrorline=42;maxprintline=79;stacksize=200;maxinopen=6;fontmax=75;
fontmemsize=20000;paramsize=60;nestsize=40;maxstrings=3000;
stringvacancies=8000;poolsize=32000;savesize=600;triesize=8000;
trieopsize=500;dvibufsize=800;filenamesize=40;
poolname='TeXformats:TEX.POOL ';
which corresponds to this part of tex.dvi, the “weaved form” of tex.web:

The listing of tex.web is
@ The program begins with a normal \PASCAL\ program heading, whose
components will be filled in later, using the conventions of \.{WEB}.
@.WEB@>
For example, the portion of the program called `\X\glob:Global
variables\X' below will be replaced by a sequence of variable declarations
that starts in $\section\glob$ of this documentation. In this way, we are able
to define each individual global variable when we are prepared to
understand what it means; we do not have to define all of the globals at
once. Cross references in $\section\glob$, where it says ``See also
sections \gglob, \dots,'' also make it possible to look at the set of
all global variables, if desired. Similar remarks apply to the other
portions of the program heading.
Actually the heading shown here is not quite normal: The |program| line
does not mention any |output| file, because \ph\ would ask the \TeX\ user
to specify a file name if |output| were specified here.
@:PASCAL H}{\ph@>
@^system dependencies@>
@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
@f mtype==type {`\&{mtype}' will be equivalent to `\&{type}'}
@f type==true {but `|type|' will not be treated as a reserved word}
@p @t\4@>@<Compiler directives@>@/
program TEX; {all file names are defined dynamically}
label @<Labels in the outer block@>@/
const @<Constants in the outer block@>@/
mtype @<Types in the outer block@>@/
var @<Global variables@>@/
@#
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin @<Initialize whatever \TeX\ might access@>@;
end;@#
@t\4@>@<Basic printing procedures@>@/
@t\4@>@<Error handling procedures@>@/
Clearly, the number of code lines in tex.p is a very rough indication of the complexity of the program. The name tangle of the program that extracts the Pascal source from the Web file exactly expresses what it does: it makes a “literate program” into something very compact and nor really human readable.
Examining the C version used for compiling TeX in TeX Live is not conclusive either, because also the C source is quite tangled.
tangle tex.web tex.ch; wc -l tex.poutputs 6891 – Henri Menke Aug 25 '19 at 09:02tangleis not a good indicator because it has multiple statements on one line. – Henri Menke Aug 25 '19 at 09:06tex.pis very compressed in comparison with usual program sources, because it doesn’t need to be “human readable”. – egreg Aug 25 '19 at 12:52