Does Silverlight have a performance advantage over

2020-06-09 01:16发布

At a recent discussion on Silverlight the advantage of speed was brought up. The argument for Silverlight was that it performed better in the browser than Javascript because it is compiled (and managed) code.

It was then stated that this advantage only applies to IE because IE interprets Javascript which is inefficient when compared to that of other browsers such as Chrome and FireFox which compile Javascript to machine code before execution and as such perform as well as Silverlight.

Does anybody have a definitive answer to this performance question. i.e. Do/will Silverlight and Javascript have comparable performance on Chrome and Firefox?

10条回答
叼着烟拽天下
2楼-- · 2020-06-09 02:08

From the cursory testing I've done, Silverlight runs faster. Here are some intersting results I gathered from http://bubblemark.com/

Bubblemark comparisons by browser and Javascript vs. Silverlight

In general, Silverlight was much faster, but Chrome's javascript implementation tore everyone else to bits!

Keep in mind, this is only on one machine, one os (XP) etc. you would need to do much more extensive tests to achieve more.

查看更多
欢心
3楼-- · 2020-06-09 02:12

I don't understand why you're trying to compare a scripting language with a browser plug-in. They don't do the same thing. The former interacts with the DOM while the latter runs multimedia apps inside the browser.

Comparing Flash and Silverlight from a performance point of view would seem more useful to me.

EDIT: After some research I found out that you can interact with the DOM in Silverlight. I don't think it can be seen as a good Javascript replacement though, performance concerns aside, unless you have some heavy client-side interaction needed. I see two main disavantadges :

1) You will force your users to download a Silverlight app instead of relying on a relatively small .js file.

2) Your users are required to install Silverlight before using your page.

查看更多
放我归山
4楼-- · 2020-06-09 02:13

It looks like that Chrome's javascript implementation is faster than Silverlight

查看更多
冷血范
5楼-- · 2020-06-09 02:14

Sre, if you're using "Internet Exploder" it probably will...

If you're using V8 (Chrome) or the upcoming Safari and FireFox, I seriously doubt it ;)

I would love to see that Chess thn BTW where IE is playing using Silverlight and Chrome is using Javascript. THAT would rock MSFT...!! ;)

查看更多
登录 后发表回答