Skip to content
Tcl Source Code Changes To CPU Profile for Tcl 9.1 interp create
Login

Changes To CPU Profile for Tcl 9.1 interp create

Changes to "CPU Profile for Tcl 9.1 interp create" between 2025-09-13 15:46:12 and 2025-09-13 16:02:10

1
2
3
4


5
6
7
8
9
10
11
1
2


3
4
5
6
7
8
9
10
11


-
-
+
+







Below are some profiling numbers for interp creation in 9.1 commit 1f8820038f.
This is subsequent to DKF's conversion of TclOO init scripts to C. The good
news is that initialization of TclOO has gone from 70% of interp creation
time in 9.0.2 to less than 8%. Doing lazy initialization of TclOO will shave off that
news is that initialization of TclOO has gone from 70% of `Tcl_CreateInterp`
time in 9.0.2 to 25%. Doing lazy initialization of TclOO will shave off that
8% too but of course the price will be paid later on actual use. It is not
clear that is worthwhile until further slow paths are explored.

To that end below are two tables that profile interp creation. Note that
the profiling was done without deleting the created interpreters and
consequently memory allocation overhead is more than if interps were deleted
allowing reuse of the free block cache. That scenario is still to be measured.
︙