您可以使用 Profile 标准库 ( https://docs.julialang.org/en/v1/manual/profile/ )对其进行概要分析,这为您提供了相当低级别的跟踪。可以使用例如https://github.com/timholy/ProfileView.jl或https://github.com/tkluck/StatProfilerHTML.jl来可视化此跟踪。
如果您想更详细地了解什么需要时间,您可以使用像https://github.com/KristofferC/TimerOutputs.jl这样的包,您可以在其中注释代码中的部分并获得一个表格,其中包含每个部分花费了多少时间部分。