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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

SIMD Matters

17 点作者 thefroh9 个月前

2 条评论

shaggie769 个月前
&gt; It is tempting to build a math library around SIMD hoping to get some performance gains. However, it often has no proven benefit ... For example, game play programmers often do a lot of piecemeal vector math. They are not chopping 8 carrots at once<p>Her point is well taken however we beat the odds on the PlayStation&#x2F;3: I don&#x27;t trust my memory to give a frame-time percentage but switching our &quot;one carrot at a time&quot; libraries from scalar to AltiVec made a measurable impact for not a lot of work.<p>We originally ported it all to SSE2 so that we&#x27;d hit GPFs for misaligned when testing on PC but whenever I compare with the Scalar version it&#x27;s marginally better too so it&#x27;s held up over time.<p>Conversely, we&#x27;ve recently found on the Nintendo Switch that NEON isn&#x27;t a clear win; I suspect that the in addition to shuffling overhead you don&#x27;t quite get &quot;4 for the price of 1&quot; like you seem to elsewhere, ie: if you&#x27;re doing a 3D vectors or matrices padded into 4-float registers unused calculations in the fourth component have a cost.<p>So she&#x27;s right -- chop 8 carrots at once if you can -- but sometimes (but not always) you can chop just 1 carrot faster with SIMD.
paulryanrogers9 个月前
Not sure I fully understood all that. Still a wonderful read. Angry Birds 29 will be even crazier! (If they even use Box2D anymore ... and if micro transactions and loot hadn&#x27;t ruined the series.)