TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JXCore LLVM JavaScript Frontend

37 pointsby andreyvitover 11 years ago

12 comments

cliffbeanover 11 years ago
This blog post is either spectacularly naive, or ridiculously over-hyped, or both.<p>&quot;Consistent performance. (not like the V8 engine pausing the whole application for GC)&quot;<p>Static complication doesn&#x27;t get you out of having to worry about memory management. What&#x27;s the alternative here? Reference counting? Leaking everything? Using a subset of JS that doesn&#x27;t allocate anything? All of these things come with considerable costs.
评论 #7226678 未加载
评论 #7225583 未加载
a-prioriover 11 years ago
This sounds like the first step in a vision I&#x27;ve had for how the web should evolve. We now have an LLVM frontend for Javascript, so Javascript code can be turned into LLVM bytecode.<p>The next step would be to swap out the existing Javascript runtimes with this frontend plus a sandboxed backend for the native platform so they can compile Javascript to LLVM bytecode, then to native code.<p>Finally, you add an extension to the &lt;script&gt; tag to allow loading arbitrary LLVM bytecode, something like &lt;script src=&quot;<a href="http://some/url/code.llvm&quot;" rel="nofollow">http:&#x2F;&#x2F;some&#x2F;url&#x2F;code.llvm&quot;</a> type=&quot;text&#x2F;llvm&quot;&gt;.<p>Once that&#x27;s in place then you&#x27;d be able to execute any language that has an LLVM front end inside the browser environment. Javascript is no longer the sole language of the web, and things like Emscripten and asm.js become obsolete.
评论 #7225714 未加载
评论 #7225980 未加载
评论 #7228565 未加载
jvilkover 11 years ago
Cool hack. Is the source code available somewhere?<p>&gt; - Consistent performance.<p>&gt; (not like the V8 engine pausing the whole application for GC)<p>But... you&#x27;re still going to need garbage collection, unless you are only planning on supporting something like ASM.js. So there will still be application pauses for GC.<p>Also, you mention that you have support for JavaScript OO, but I notice the benchmarks don&#x27;t exercise programmer-defined JavaScript objects&#x2F;prototypes. Do you have numbers on its OO performance, or is that still something you&#x27;re working on?<p>Finally, how do you handle type inference at the LLVM level? I assume you implemented some form of JIT compilation? I&#x27;d be interested to hear more!
pjmlpover 11 years ago
Nice to see a dynamic language getting an AOT compiler, in this VM age, even if it is JavaScript. :)
评论 #7225379 未加载
jmgrosenover 11 years ago
Does this mean I can translate JS to LLVM bitcode with this tool, then translate that bitcode back to Javscript with Emscripten? Sounds amazing :)
azakaiover 11 years ago
&gt; Javascript has always been considered as a scripting language with low performance compared to most low level languages. Thanks to V8 engine, it is now becoming a platform where developers can prepare a fully functional backend.<p>This is not accurate, and shows a lack of respect for the JS VM developers at other browser vendors.<p>Very close to the time v8 was launched, SquirrelFish Extreme from Apple and TraceMonkey from Mozilla were also launched, each far faster than previous JS VMs, beat v8 on various benchmarks while losing on others, etc.<p>Since then v8 has generally been in the lead, certainly, but not always, and it would depend on the benchmark and platform.<p>So it is not fair to say - and this is not the first time I see it, or else I would not write this comment - that v8 is single-handedly responsible for JS being fast today.
cpetersoover 11 years ago
Does Node have an equivalent to the JVM&#x27;s server and client modes? Node can probably assume that it will be hosting a long-running server process, skip the lazy JIT, and just AOT compile all JS code at maximum optimization.
TheMakeAover 11 years ago
My only concern is Apple&#x27;s patent for this: <a href="http://www.google.com/patents/US20100153929" rel="nofollow">http:&#x2F;&#x2F;www.google.com&#x2F;patents&#x2F;US20100153929</a>
评论 #7227016 未加载
评论 #7225943 未加载
andreyvitover 11 years ago
Found this via [1], would love to hear some opinions from knowledgable people here.<p>[1] <a href="http://www.echojs.com/news/8496" rel="nofollow">http:&#x2F;&#x2F;www.echojs.com&#x2F;news&#x2F;8496</a>
ahogeover 11 years ago
They should have used one or several of the existing benchmark suites instead of creating their own micro benchmarks.
评论 #7226663 未加载
评论 #7225150 未加载
moisyover 11 years ago
native javascript mobile
评论 #7225616 未加载
评论 #7226398 未加载
conanobreover 11 years ago
I was expecting this coming