LWN.net Logo

The Shumway open SWF runtime project

The Shumway open SWF runtime project

Posted Nov 13, 2012 22:19 UTC (Tue) by kripkenstein (subscriber, #43281)
In reply to: The Shumway open SWF runtime project by smurf
Parent article: The Shumway open SWF runtime project

Very different architectures. Shumway builds upon the existing JS JIT and browser hardware acceleration, and benefits from the browser's portability, whereas the others are written in native code, which means it is simpler for them to get fast code in general, but harder to get portability, a fast JIT specifically, graphics acceleration, and sandboxing.


(Log in to post comments)

The Shumway open SWF runtime project

Posted Nov 13, 2012 22:21 UTC (Tue) by Company (guest, #57006) [Link]

Because JITs built in Javascript are known to be incredibly fast, which is why Java and Python run faster in browsers than natively...

The Shumway open SWF runtime project

Posted Nov 13, 2012 22:25 UTC (Tue) by kripkenstein (subscriber, #43281) [Link]

> Because JITs built in Javascript are known to be incredibly fast, which is why Java and Python run faster in browsers than natively...

JS JITS *are* in fact among the fastest in dynamic languages, matched only by LuaJIT.

If Java or Python would JIT into JS, thereby reusing the JS JIT, then they could be very fast in the browser too. I've been wanting to do that exact project with PyPy (compile PyPy C code using Emscripten, add a JS JIT backend), am still hoping to interest the PyPy devs in it some day.

For Flash specifically though, the language is very close to JS. JITing into JS there is simpler than the alternatives, and should give good results. Would be interesting to compare to the AS engines in the other FOSS Flash implementations.

The Shumway open SWF runtime project

Posted Nov 13, 2012 22:41 UTC (Tue) by khim (subscriber, #9252) [Link]

If Java or Python would JIT into JS, thereby reusing the JS JIT, then they could be very fast in the browser too.

May be Python, but most definitely not Java. Java programs are often slower but that because Java libraries have so many useless levels of indirection, but Java JITs are much faster then JS ones. Translation to JS JIT can not fix broken libraries design.

The Shumway open SWF runtime project

Posted Nov 13, 2012 23:41 UTC (Tue) by ssmith32 (subscriber, #72404) [Link]

And Flash only needs to be fast enough to start the video playing on hulu :)
Are there really any other good uses for it? ;)

killer app: games

Posted Nov 14, 2012 10:58 UTC (Wed) by eru (subscriber, #2753) [Link]

Are there really any other good uses for it? ;)

Casual games on the Web. Very popular. My kid divides his game time pretty evenly between those, and Wii. Every TV series for youngsters seems to have Flash games on their web site. Interestingly, some involve a "game builder" where the user can construct game fields from components, then test play and share them. So not they are not always totally mindlessly passivating.

Must check how well Shumway and other free alternatives deal with these nowadays. I did try some Gnash version on the one of the simpler ones years ago, and the result was garbage.

killer app: games

Posted Nov 14, 2012 11:29 UTC (Wed) by hummassa (subscriber, #307) [Link]

> Must check how well Shumway and other free alternatives deal with these nowadays. I did try some Gnash version on the one of the simpler ones years ago, and the result was garbage.

Seconded. My 6yo daughter would benefit too -- tho flashplugin-installer + chrome has not been the pain in the back that they once were. But I agree wholeheartedly that those games are very good testing ground for new swf runtimes...

The Shumway open SWF runtime project

Posted Nov 20, 2012 1:01 UTC (Tue) by philh (subscriber, #14797) [Link]

> If Java or Python would JIT into JS, thereby reusing the JS JIT, then they could be very fast in the browser too.

I think you may be looking for "pyjamas": http://pyjs.org/
(although, not sure about the JIT bit of that, but it does include a python to JavaScript compiler, so would perhaps be a start)

The Shumway open SWF runtime project

Posted Nov 20, 2012 11:55 UTC (Tue) by kripkenstein (subscriber, #43281) [Link]

Pyjamas is very useful, but it doesn't have 100% compatible semantics with Python - it uses the underlying JS semantics. It also doesn't support the Python standard library. Compiling and optimizing PyPy would get around both of those issues.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds