Hans Aberg <[log in to unmask]> writes:

>   I do not know if folks are doing profiling on TeX/LaTeX, but an easy way
> would be to set \tracingcommands = 1, and then count the frequency in the
> log file of the different commands executed.

Did you mean \tracingmacros? In a high-level format macro expansions
take up more than half of the processing. One would normally want

  \tracingmacros=2 \tracingcommands=2

It is perhaps of interest to note that unless the tex.pool file is
changed, \tex_global:D will be reported in the log file as
"{\global}", \scan_stop: will be reported as "{\relax}", and so
on. Perhaps e-TeX can provide something useful here for making name
changes in some way easier than retangling tex.web. (You can just edit
the .pool file, of course---I have done it myself in the past---but
then you have to go to some nontrivial extra trouble if you want to
synchronize the checksums.)