Although -profile works, it is slow enough that its use is severely restricted on larger, more complex programs. Decreasing its overhead by a factor of 10 will help with this.
One place to start is trace_addsym(). It does a tree lookup of the function name upon every function entry. It could be replaced with a hash lookup of the return address for _c_trace_pro() in druntime/src/rt/trace.d.
Comment #1 by robert.schadek — 2024-12-07T13:32:37Z