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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Analyzing Data 170,000x Faster with Python

97 点作者 montebicyclelo超过 1 年前

5 条评论

ndr超过 1 年前
For context, this is in response to &#x27;Analyzing Data 180,000x Faster with Rust&#x27; [0], previously discussed on HN [1]<p>[0] <a href="https:&#x2F;&#x2F;willcrichton.net&#x2F;notes&#x2F;k-corrset&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;willcrichton.net&#x2F;notes&#x2F;k-corrset&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37964161">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37964161</a>
orf超过 1 年前
I’m all for not prematurely optimising and the point of the authors post is still valid, but it is hard to argue that the resulting code is more readable or understandable than the rust code.<p>The rust code is pretty simple, and plain, and doesn’t need any of these tricks
评论 #38063831 未加载
评论 #38065077 未加载
评论 #38071785 未加载
评论 #38082864 未加载
IshKebab超过 1 年前
Interesting for sure, but that&#x27;s definitely a more painful optimisation journey than the Rust one, which only involved Rust. No custom JITing of a subset of Rust, or calling out to C.<p>I think the real takeaway from my experience of Rust vs Python performance is that in practice people don&#x27;t optimise 99% of Python so the real number of significance is the 8x speedup he got from just switching to Rust with no profiling whatsoever.<p>That&#x27;s actually quite a low difference compared to my experience - I&#x27;d say 50x is more typical.
评论 #38083185 未加载
a_bonobo超过 1 年前
Would be very interested in seeing how torch.compile() fares with OP&#x27;s numpy portions: <a href="https:&#x2F;&#x2F;pytorch.org&#x2F;blog&#x2F;compiling-numpy-code&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;pytorch.org&#x2F;blog&#x2F;compiling-numpy-code&#x2F;</a>
herdcall超过 1 年前
This seems like a meaningless claim because the core parts of both itertools and pandas libraries used here are written in C, unless I&#x27;m missing some context here.
评论 #38083474 未加载