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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Nashorn Architecture and Performance Improvements in Upcoming Release

46 点作者 swannodette超过 10 年前

2 条评论

trhway超过 10 年前
&gt;Conservatively, when implementing a JavaScript runtime in Java, anything known to be a number can be represented in Java as a double, and everything else can be represented as an Object.<p>sounds like beginning of a horror story.<p>&gt;and that&#x27;s where optimistic type system comes in. Our optimistic type system works by assuming that any statically unprovable type is an int, the narrowest possible of all types. If this turns out to be wrong at runtime, e.g. we load a field from memory&#x2F;scope that turned out to be an Object or a double instead, or if we perform a 32-bit addition that overflows, we will replace the executing code with a more conservative version, that is regenerated on the fly.<p>i hope all that heroism and effort has a good reason for it beside just being a great&#x2F;interesting engineering endeavor.
评论 #8742468 未加载
评论 #8747641 未加载
SerCe超过 10 年前
One day nashorn on jvm would be faster then V8.
评论 #8742656 未加载