r/programming • • Dec 20 '10

A Christmas Tree in 1k of Javascript

http://www.romancortes.com/blog/how-i-did-the-1kb-christmas-tree/
1.1k Upvotes

221 comments sorted by

View all comments

Show parent comments

8

u/[deleted] Dec 20 '10

I don't know what could cause that but i'm suspecting that hardware acceleration has a lot to do with it. It seems that javascript is one of the things that is fully output with software only. If there was hardware acceleration then it would be blazing fast.

It's like trying to render out a 3d game with software (ie. CPU only). It doesn't matter what computer you use, it's going to get crushed trying to spit out those polygons. But on hardware acceleration it's all offloaded onto the GPU which is specially designed to handle just such things, which is how we enjoy things like that these days.

2

u/mdot Dec 21 '10

So there is some way that Chrome can invoke hardware acceleration that the others cannot?

Not trying to smart ass, because I honestly want to know the answer. But hardware acceleration doesn't explain different CPU usage, using different browsers, on the same machine.

3

u/[deleted] Dec 21 '10

Yes, they each need to implement hardware acceleration, its not just something that comes for free.

1

u/mdot Dec 21 '10

Ok, I understand that you can't get something for nothing.

However, is it then, your contention, that Chrome is the only browser that explicitly makes use of hardware acceleration? Seems pretty far-fetched to me.

1

u/[deleted] Dec 21 '10

I didn't say chrome is the only one doing it. They're all doing it, but it's a recent development so everyone has different bits done, and they each have a ways to go.

Also, "hardware acceleration" is a pretty blanket term for a lot of things. It could mean webGL, it could mean compositing using GL, it could mean rendering the page using tiles, etc.

1

u/mdot Dec 21 '10

Thanks for the info...TIL.