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.

15

u/ascendant512 Dec 21 '10

I was forced to register because of this thread and some comments in it. The Chrome fanboys here are quite ridiculous.

Chrome does not have hardware-accelerated javascript. Hardware-accelerated javascript does not exist. You are mistaking it with WebGL which is present in Safari, Firefox (3 and 4) and Chrome. WebGL has nothing to do with javascript, it is a hardware accelerated <canvas> element (HTML5). Chrome has barely any more hardware acceleration than Microsoft Powerpoint.

Furthermore, the Christmas tree is not rendered with polygons, it is rendered with sprites. It says so right on the front page.

1

u/techdawg667 Dec 21 '10

then the speed advantage of chrome over firefox is ever more awesome now!

0

u/ascendant512 Dec 21 '10

do you mean the speed advantage of firefox over chrome? :D

1

u/techdawg667 Dec 21 '10

that graph is almost 2 months old o.o