TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Profiling your Numba code

67 点作者 itamarst超过 1 年前

5 条评论

IshanMi超过 1 年前
I still remember discovering &amp; using numba for the first time in university. At the time I didn&#x27;t know any programming languages except for Python, and wasn&#x27;t super great at Python either. We had to write and run molecular simulations for our numerical methods and simulations class, and people were writing their code in C&#x2F;C++ and were blazing through it. I remember finding out about Numba through the High Performance Python O&#x27;Reilly book, and by just adding a single @jit decorator, my simulations were dramatically faster.<p>Amazing stuff, honestly felt like black magic at the time.
评论 #39195984 未加载
eachro超过 1 年前
Do people use numba outside of scientific computing code? feel like for most &quot;normal&quot; uses, you&#x27;d probably be fine with having your code written in numpy or pandas, so I&#x27;d love to hear what people generally use numba for outside of scientific computing.
评论 #39196199 未加载
评论 #39197234 未加载
评论 #39197386 未加载
评论 #39201549 未加载
评论 #39197455 未加载
评论 #39195138 未加载
评论 #39200742 未加载
评论 #39199686 未加载
评论 #39197223 未加载
tripplyons超过 1 年前
I didn&#x27;t realize Numba supported CUDA:<p><a href="https:&#x2F;&#x2F;numba.readthedocs.io&#x2F;en&#x2F;stable&#x2F;cuda&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;numba.readthedocs.io&#x2F;en&#x2F;stable&#x2F;cuda&#x2F;index.html</a>
montebicyclelo超过 1 年前
This addresses a real pain point, of Numba not being so easy to profile, (especially compared to Python and line-profiler), so will definitely be trying this out!
LeakedCanary超过 1 年前
I tend to disagree with the following sentence mentioned in the article:<p>&gt; One hypothesis is instruction-level parallelism<p>This is <i>Python</i> code, whose execution has a massive gap to the actual CPU instructions executed. The experiment result feels more like something related to the memory cache.