Live data from Hacker News

The V8 Myth: Why JavaScript is not a Worthy Competitor

blogs.adobe.com

41–50 of 100 posts

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#41

So... Adobe is arguing that nobody will ever figure out how to put a better compiler in front of JavaScript under any circumstances, so we have to pack it in now? I realize current JIT sucks in many ways, but seriously... claiming that "we can put this compiler in front of our stuff and since the other guys can never, never figure out how to compile first, we will win forever" isn't just stupid. It seems willfully st…

Well, to be fair, the article does start with the warning that this is not the opinion of Adobe.

But yes, it seems absurd to say that JIT compilers will never get better, especially given the improvements we've seen in the last few years.

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#42
This performance claim doesn't seem to match the measurements others have done.

For example, using the code from http://iq12.com/blog/as3-benchmark/ which I've put up here: http://people.mozilla.com/~jmuizelaar/v8-flash.html, I get a score of 2134 with Flash vs 11796 in Chrome. At least on this benchmark, it looks like V8 is a worthy competitor.

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#43
The argument in the article is true but this applies to any AOT language not just actionscript. A look at two popular 'alternatives' are native client and a vm in this instance serve two separate issues: sandboxing and standardization / interoperability. The issue with the latter is standardizing a bytecode would be complicated and a candidate could possibly be the parrot vm.

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#44
post #12
post #4

Earlier quoted context omitted.

Upvoted not for the humor, but for the aptness of the analogy. JavaScript is universal and free. If Adobe can create a sort-of-compatible environment that allows certain classes of apps like games to run better, great for them. Perhaps their marketing can be, "If JavaScript isn't fast enough, we've got you covered." At least it's not Dart!

It really is appropriate. I love how we keep getting told by guys that are not writing large apps in dynamic languages, that we can't write large apps in dynamic languages meanwhile guys like me are out there building some of the largest code bases in the world with JavaScript. And when it works and we release something revolutionary to the world, they tell us after the fact that it is not going to work. AMD and modu…

I think I would have heard about it if you'd released something revolutionary using several million lines of JavaScript...

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#45
post #27
post #7

At best, this reeks of like 2000-era Microsoft, "Why does everybody get so excited about Javascript still? ActionScript is way better! Duh!" As far as actual points in the fine article -- a test using some sort of strongly typed data on an unreleased actionscript vm ran three times faster than v8 running similar code. I'm not shocked at all, and think Javascript could badly use at the least some type hinting, persona…

Out of interest, is there anything you can share about the particulars of your application? We did the same Flash vs. HTML5 analysis in the context of Facebook games, but in our experiments it looked like Flash still won handily in terms of performance.

Not just that, even the Google Chrome support for SVG is terrible, it crashes very quickly if you draw a lot of nodes. I also found very simple bugs like moving a SVG objects leaves a trail behind. A good vectorial support is needed to replace flash.

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#47

Earlier quoted context omitted.

I think he's talking about using Javascript in flash's tradition role, i.e web games and interactive content.

I was going to comment, if Tamarin is so great, why haven't you integrated it into the browsers? But in doing my due diligence, I realized that Adobe did give the code to Mozilla for exactly that. So this is actually about the language beyond Flash.

Wikipedia:

"The project to integrate Tamarin and SpiderMonkey was called "ActionMonkey",[6] but was canceled in 2008[7] because Tamarin's interpreter turned out to be slower than SpiderMonkey."

Ironically, it was too slow :P

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#48
I've written both large ActionScript 3 (AS3) projects and large single page Javascript applications so I think I have a pretty good understanding of both languages.

For those of you who haven't done any AS3 programming it is a superset of the ECMAScript 4 standard while browser based Javascript uses ECMAScript 3.1. AS3 "feels" more like Java in that it adds syntax for types and classical inheritance but if you are lazy you can use * for the type and prototypical inheritance still works. Both of those might horrify static language/GOF purists but it does allow you to pass objects around on the side without refactoring pure OOP interfaces or inheritance trees.

In the end I enjoy working in AS3 with its static type checking more than I do Javascript pushed through JSLint. With large Javascript apps, even with strict use of the Module pattern, I feel like my code contains hidden runtime bombs waiting to do off.

Some caveats - I'm on a Windows machine and Flash runs great for me. I've also never developed with "use strict" in Javascript, which I probably should.

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#49
post #26
post #15

Earlier quoted context omitted.

"building some of the largest code bases in the world with JavaScript" You have over 100 MLoc?

You are focusing on the wrong part of the conjecture, the point is, large code bases are being written in JavaScript everyday. Yet, People with the position like the author continue to argue that it can't happen, despite the evidence being readily available. I don't want to dodge your question thought, the answer is yes I have worked on some JavaScript code bases that are several MLoc. Which I would consider for conj…

Which javascript project did you work on that had several million lines of code?

If you can't tell us that, at least tell us what _kind_ of project it was please.

Re: The V8 Myth: Why JavaScript is not a Worthy Competitor

#50

I have absolutely no idea how I would write Hello World in Flash. What compiler do I need. Do I need a compiler. Do I need to buy it? Is that all I need? Compared to: $ vim helo.html alert("hellooooo"); And if you can't write that from scratch, ViewSource on most web pages will give you a good clue. That looks like trump for mindshare, disputed performance questions aside.

File -> New
Post reply on HN