River Trail — Intel's Parallel JavaScript
mikejuk writes "Intel has just announced River Trail, an extension of JavaScript that brings parallel programming into the browser. The code looks like JavaScript and it works with HTML5, including Canvas and WebGL, so 2D and 3D graphics are easy. A demo video shows an in-browser simulation going from 3 to 45 fps and using all eight cores of the processor. This is the sort of performance needed if 3D in-browser games are going to be practical. You can download River Trail as a Firefox add-on and start coding now. Who needs native code?"
What about a beowulf.js cluster of these?
Trolling is a art,
CPUs
Scala is awesome. If you write in the functional style, you get "parallel" for free.
the concept of assigning more than 1 cores to a single thread
Computing doesn't work that way. At least not with any meaningful speed increase. That may decrease power usage, but you'll still need "parallel programming shit" to make proper use of parallel processing hardware.
People who don't have 8 cores available and who want acceptable performance? People who want their Windows 8 tablet to have a real world battery life longer than two hours?
There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
anyone who recognizes you'll pay a pittance to the browser for your share of the fun.
Good people go to bed earlier.
You do realize you are responding to a troll, right? This guy is just some loser php "programmer" who knows jack and shit about real programming.
Ha ha, a 15x speedup by going from 1 to 8 cores? No. It's hard to invent a situation in which you would get a genuine 8x speedup, let alone somehow making each core almost twice as fast.
We need some sort of metrics here. The I Programmer article content here is using only 314x1213 pixels on my laptop. The whole page have 1160x2078! Only about 16% of my screen area is the article's content. This is like listening to 50 minutes of commercials every hour on the radio. No one would accept that on the radio and I say we shouldn't here. Thanks!
We already have Web Workers, they just can't access the DOM. Why can't they just try to improve the existing framework instead of inventing their own?
What kind of magic gives > linear speedup?
...could use a bit of multicore speedup itself.
Its about time!
Personally, I think we should just throw away all the other languages and use JS for everything. Why not - it's the future! Between it and the HTMLx (can't really say 5 - it's a 'living standard' afterall), I expect that it will not only slice my bread but also make it for me too. I say we reinvent the wheel just once more for the hell of it. Afterall, it's all cool-like and really awesome (insert other superlatives here). Well, erm, until it's not - and then we rinse and repeat. Oh, the joy!
Not entirely. One of the features of Sun's cancelled Rock CPU was something they called Thread Scout. The idea was to run one core ahead of another, skipping most computation, to pre-fault memory addresses. This ensured that data was in cache when it was needed. There was also an idea to use multiple cores to extend the superscalar concept, so when you encountered a branch one core took each potential path and you discarded the wrong one. A lot of GPUs used to do this, but no general purpose CPUs (that I'm aware of, although ARM and Itanium do something similar with their predicated instructions).
You're right that you won't get the full benefit of writing proper concurrent code, but you will get some.
I am TheRaven on Soylent News
I just don't know why.
JavaScript is a hateful, spiteful language. If you're trying to write a real application PLEASE switch to a language more appropriate -- like COBOL. Or even INTERCAL.
If your GPU sucks, try to get people to buy 8 CPU cores and do graphics on those. Seriously, doesn't WebGL allow use of the GPU? If not, fix that.
The browser plugin only seems to work with Windows and MacOS X.
So... what? It's an advanced form of out-of-order execution. Big deal, it's been around a LONG time. Revolutionary my ass.
Remember to maintain your supply of
I see no problem at all with a parallel version of JavaScript. But the question I have is who is really going to use this? Granted, some might say "anyone who wants to make money, this is the future of gaming and entertainment". I certainly hope it isn't! Is a browser really the platform of choice for high performance graphics? I think not. Is there anything really wrong with having a native client to produce something so specialized as a graphics intensive platform? Must we really look to a future where everything runs inside of a browser?
There was also an idea to use multiple cores to extend the superscalar concept, so when you encountered a branch one core took each potential path and you discarded the wrong one.
Given how accurate branch predictors are, what's the point in computing the non-predicted paths?
Not entirely. One of the features of Sun's cancelled Rock CPU was something they called Thread Scout. The idea was to run one core ahead of another, skipping most computation, to pre-fault memory addresses.
That was done back in the days with the original 68000. They were put in tandem in some machines, and one processor ran slightly ahead of the other. If it hit a bus fault, the second 68000 was used to recover, as the original 68K could not recover normally from a bus fault. Obviously this was not for performance purposes, but rather for reliability, but it's amazingly similar.
The oh-ten could recover from bus faults, and the 020 had a full-scale (although external) MMU option, so the technique ceased to be used.
That means the animated ads can now suck up all of my CPU, rather than just one core's worth. I can't wait!
That is all.
Instead of get a 50$ graphics card and play Doom3 on it, we need now 8 cores CPU to play JavaScript games in the browser? That is the bright future we can look for with ChromeOS and "the browser is the OS" future?
http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
but rather prefer to use them for something meaningful but the weirdly scrolling ad annoying them in some partialy visible background window....
According to this page, RiverTrail "adds the ParallelArray data type to JavaScript [...] accessible by functions like combine, filter, map, reduce, etc. which perform work in parallel." Hope that saved you some searching.
Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
Why should an application decide the best way to split a load over multiple cpu cores? How does it know what else is going on in the OS to balance this load? Shouldn't the OS handle this behind the scenes?
Gee, why would I need native code when I can push 45 fps on 8 cores using HTML5, instead of maxing out the latest source engine games (300fps) at 1900x1200 with max graphical settings using 4 cores (l4d2, portal2)?
Screw that native code!
Just to make sure I got this straight:
Intel took one of the slowest interpreted languages, though the most popular one, and added parallel data primitives and functions. Then they used a pointless little particle fountain demo to show off its benefits.
So rather than try to make Javascript execute faster, they spread its disease to all 8 cores. How is this an improvement ? The last thing I want is for a web page to sap my CPU and battery life, doing things web pages should not be doing in the first place. Save that Javascript for friendly client-side form validation and UI animation. Everything else is a hack. 3D graphics in the Javascript is a hack. Heavy number crunching in Javascript is a hack. Fuck off with your hacks! If I want fancy graphics and high framerates, I'll run native code.
-Billco, Fnarg.com
Web workers takes care of this and launches things in different processes. The only browser that doesn't support it is IE, but that will change with Windows 8 next spring.
It can take care of this without Intel's code
http://saveie6.com/
I have a couple benchmarks i've run over the years, in multiple languages. For CPU intensive jobs on the same machine:
C: 1
Java: 1.1-3
javascript: 117
Javascript is in IE8 on win xp.
Javascript on IE has restrictive time limits for execution, though there are work arounds.
But If you have 8 cores, you're still 14.6x slower than C.
IMO, Java, which already runs in the browser, is the better solution. That said, compared to C, Java also has huge memory requirements.
It would make more sense to allow mutli-core execution in Java in the browser.
-- Stephen.
It might not only be out of order execution. It might must be cache. 8 cores certainly run on more than 1 L3 cache. More cache=>(possibly superlinearly) faster
Don't worry, there's plenty of dick for both of your holes.
Interesting.
Google Native Client can run C++ multi threaded in a browser using pthreads.
I think all functional langs do that
-- no sig today
I think developments like this make Dart doomed from the start. There is no way they can provide enough of a performance benefit to matter. There's just too much momentum in Javascript optimization.
How does making it faster benefit Intel? But if all your favourite web apps and games run faster with a new quad or eight core CPU than your current dual or single core, then you have another incentive to upgrade. What, you didn't expect Intel to be working on Javascript out of altruism did you?
Anyway Google are doing a good job at just making Javascipt faster, how much more improvement do you think Intel could get over what Google has done without making better use of CPU cores?
How can it be a troll and the guy not know anything at the same time..
You do realize you are responding to a troll, right? This guy is just some loser php "programmer" who knows jack and shit about real programming.
flamebait? what's that shit about allways picking on php? you could even do parallel programming in php