Cprofile中的Numba条目
当使用 cprofile 分析代码时,我注意到出现了很多引用 numba 编译器的 numba 条目。我知道由于编译,第一次运行脚本时计算时间很长。
然而,所附的屏幕截图显示了应该编译的脚本中的 cprofile 条目(该脚本至少运行了两次,并且总计算时间也减少了)。
因为屏幕截图中显示的功能仍然消耗大量时间,所以我问自己使用 numba 是否做错了什么。此外,如果代码已经编译,则调用编译器函数是没有意义的。有没有办法找出已编译的函数是否已在存储中?
When profiling code with cprofile, I noticed that there appear a lot of numba entries referring to the numba compiler. I know that the computation time is high at the first run of the script due to compiling.
The attached screenshot however shows cprofile entries from a script which already should be compiled (The script was run at least twice and also the total computation time decreased).
Because the functions shown in the screenshot still consume a lot of time, I asked myself if I do anything wrong using numba. Additionally, it does not make sense to call a compiler function if the code is already compiled. Is there a way to find out if compiled functions are already in storage?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论