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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

A New Bytecode Format for JavaScriptCore

211 点作者 stablemap将近 6 年前

12 条评论

cogman10将近 6 年前
I&#x27;m unclear, why transform to a bytecode as a first step? Wouldn&#x27;t it be simpler to instead to transform to an AST and work against that for everything? Wouldn&#x27;t it make sense to generate the bytecode as sort of a last step before doing heavy duty optimizations?<p>Seems like with JS you would be constantly transforming from bytecode -&gt; AST -&gt; bytecode -&gt; machine code, such as every time a method adds a new field to an object or some optimization assumption is violated. It doesn&#x27;t seem like it would be easier or faster to work with. I&#x27;m guessing there wouldn&#x27;t be a whole lot of memory benefits either.<p>Would someone mind illuminating me on this design choice? (Granted, I&#x27;ve not taken a compilers course, so feel free to call me an idiot for not knowing something basic about how compilers work).
评论 #20245707 未加载
评论 #20245827 未加载
评论 #20245408 未加载
评论 #20245357 未加载
评论 #20245490 未加载
评论 #20247259 未加载
评论 #20245416 未加载
akling将近 6 年前
Kudos to Tadeu Zagallo and the JSC team for landing this awesome patch!<p>I&#x27;ve worked on WebKit memory performance in the past, so I&#x27;m well aware that these aren&#x27;t low hanging fruits we&#x27;re talking about. The type safety bonus features look great too. :)
twoodfin将近 6 年前
Re: Direct vs. indirect threading (aka ordinary dispatch). I had the impression that recent Intel x86 chips did enough trace caching to render any performance distinction basically irrelevant. Is that right?<p>(Of course, Apple has their own ARM implementations to consider.)<p>EDIT: Here’s the paper I was thinking of in this regard:<p><a href="https:&#x2F;&#x2F;hal.inria.fr&#x2F;hal-01100647&#x2F;document" rel="nofollow">https:&#x2F;&#x2F;hal.inria.fr&#x2F;hal-01100647&#x2F;document</a>
评论 #20245951 未加载
the_duke将近 6 年前
Impressive improvements.<p>I wonder how performance and memory use compare nowadays between V8, Spidermonkey and JavascriptCore.<p>Does anyone have a link to recent trustworthy and thorough benchmarks? (Google doesn&#x27;t really spit out anything noteworthy...)
评论 #20245143 未加载
评论 #20245644 未加载
nielsbot将近 6 年前
When they talked about getting rid of their threaded interpreter, I was reminded of this article from 2008 about writing fast interpreters, if that&#x27;s interesting to this audience:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2593095" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2593095</a> [hn link]
_alastair将近 6 年前
This is interesting! If anyone from WebKit is in the comments, can you provide link(s) to the bugs discussing the bytecode caching API? I&#x27;d love to take a look but my Bugzilla search skills are evidently weak.
评论 #20246341 未加载
评论 #20244725 未加载
riotman将近 6 年前
Do they have a different bytecode and runtime from WASM? Why not unify everything to web assembly byte code?
评论 #20245425 未加载
评论 #20245385 未加载
singularity2001将近 6 年前
Now please expose a loadFromByteCode api so that we can target bytecode instead of transpiling to js.
评论 #20245853 未加载
评论 #20245735 未加载
评论 #20245737 未加载
评论 #20247574 未加载
评论 #20245854 未加载
评论 #20245729 未加载
DiseasedBadger将近 6 年前
WebKit2 Qt when? Also, full QNetworkConnection support. That would be great.
pier25将近 6 年前
Is it possible to pregenerate that bytecode?<p>For example for hybrid desktop&#x2F;mobile apps.
评论 #20245916 未加载
评论 #20246057 未加载
novok将近 6 年前
You mean like binast? <a href="https:&#x2F;&#x2F;github.com&#x2F;binast&#x2F;binjs-ref" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;binast&#x2F;binjs-ref</a>
评论 #20245937 未加载
ksec将近 6 年前
And it is already shipped in Safari 12.1 ( Which means many are already using it )<p>Time and Time again it seems WebKit are the only team that wants to make the Web with better Web <i>Pages</i> with javascript , All the others seems to want the Web to be Fat <i>Apps</i>.<p>In the hope of anyone in Safari team is reading it.<p>Please make the Tab Overview Cache the Thumbnail or in List format, currently pressing Tab Overview will reload all the tabs in the background. I don&#x27;t know if this is for generating thumbnails or other reason. Something that kills my machine when I have 300 Tabs, most of them are &quot;cold&quot; and not loaded.
评论 #20245781 未加载
评论 #20245751 未加载
评论 #20245770 未加载