All times are UTC-06:00




Post new topic  Reply to topic  [ 19 posts ] 
Author Message
PostPosted: Fri Dec 19, 2008 8:02 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
We would like to find any developers here who would be willing to work on optimization of Javascript engines specifically for PowerPC - the current crop (SquirrelFish, Tracemonkey, V8) are all native-code generating engines which need specific processor and platform support to work.

Tracemonkey as used in Firefox has a "todo" list which includes PPC and SSE opcodes (i.e. it doesn't take advantage of PPC right now, or SIMD engines even on x86). The technology is based on the ActionScript engine (Tamarin) which is used in Adobe Flash and Adobe Air, so the bytecode engine should be back portable if possible. But at least Firefox and anything using the Mozilla JS engine would benefit.

Obviously SquirrelFish Extreme would be the other one to try. It depends on your preferred browser product.
SquirrelFish would drop right into Sputnik, for MorphOS users, as well as benefiting Linux and embedded users.

Would anyone like to work on this project?

_________________
Matt Sealey


Top
   
PostPosted: Sun Dec 28, 2008 12:49 pm 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
We would like to find any developers here who would be willing to work on optimization of Javascript engines specifically for PowerPC
Just some hints for the curious.

A version of Tracemonkey's nanojit (which covers x86, x86-64, ARM and Thumb instruction sets) is in the /js/src/nanojit/ directory in the Mozilla Tracemonkey branch.

SquirrelFish Extreme (in trunk, which covers x86 basically) is in the /JavaScriptCore/VM directory of WebKit. It looks like it requires a hell of a lot more work to abstract out the "other" processor architectures it could support.

Google's V8 engine is here and looks to be at the same level of "maturity" as TraceMonkey when it comes to supporting multiple architectures out of the box. The source for reference is here.

Any one of these (or better, all of these) would be great ported to PowerPC.

_________________
Matt Sealey


Top
   
PostPosted: Tue Jun 02, 2009 5:34 pm 
Offline

Joined: Tue Jun 02, 2009 3:36 pm
Posts: 5
Quote:
We would like to find any developers here who would be willing to work on optimization of Javascript engines specifically for PowerPC - the current crop (SquirrelFish, Tracemonkey, V8) are all native-code generating engines which need specific processor and platform support to work.

...

Would anyone like to work on this project?
Yes! Please contact me.


Top
   
PostPosted: Wed Jun 03, 2009 3:51 pm 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Quote:
We would like to find any developers here who would be willing to work on optimization of Javascript engines specifically for PowerPC - the current crop (SquirrelFish, Tracemonkey, V8) are all native-code generating engines which need specific processor and platform support to work.

...

Would anyone like to work on this project?
Yes! Please contact me.
Hi Robin,

I got your mail but I am still running through some things right now and haven't had time to really engage with the requirements.

The simplest requirement is basically, making sure it's generating bytecode, then optimizing for AltiVec if possible. I am fairly sure there is a lot you can do for the Math class - especially the sunspider etc. benchmarks do some heavy stuff here and even a huge boost in one area would be great :)

_________________
Matt Sealey


Top
   
PostPosted: Thu Jun 04, 2009 10:03 am 
Offline

Joined: Tue Jun 02, 2009 3:36 pm
Posts: 5
Quote:
The simplest requirement is basically, making sure it's generating bytecode, then optimizing for AltiVec if possible. I am fairly sure there is a lot you can do for the Math class - especially the sunspider etc. benchmarks do some heavy stuff here and even a huge boost in one area would be great :)
The boost seen on IA-32 was quite serious. Even non-optimized machine code executes much faster than the interpreter. See:
http://weblogs.mozillazine.org/roadmap/ ... ghtsp.html

In any case, I have experience developing SpiderMonkey/TraceMonkey and would love to add PowerPC support to (for example) V8.

An obvious advantage of having an open source high-speed JavaScript compiler that generates Power machine language is that all Power ISA devices could then use JavaScript as a safe plugin language. The current generation of gaming consoles (PS3, Wii, XBox 360) all have PowerPC CPUs. An embedded JavaScript interpreter operating in those environments would allow gamers to write their own customized JavaScript code. Users could create their own levels, their own logic, etc.

Another advantage would be to speed the web browsing experience on handheld devices that have Power-based architectures.

_________________
Robin Bate Boerop
http://shorestreet.com


Top
   
PostPosted: Thu Jun 04, 2009 5:57 pm 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Quote:
The simplest requirement is basically, making sure it's generating bytecode, then optimizing for AltiVec if possible. I am fairly sure there is a lot you can do for the Math class - especially the sunspider etc. benchmarks do some heavy stuff here and even a huge boost in one area would be great :)
The boost seen on IA-32 was quite serious. Even non-optimized machine code executes much faster than the interpreter. See:
http://weblogs.mozillazine.org/roadmap/ ... ghtsp.html

In any case, I have experience developing SpiderMonkey/TraceMonkey and would love to add PowerPC support to (for example) V8.

An obvious advantage of having an open source high-speed JavaScript compiler that generates Power machine language is that all Power ISA devices could then use JavaScript as a safe plugin language. The current generation of gaming consoles (PS3, Wii, XBox 360) all have PowerPC CPUs. An embedded JavaScript interpreter operating in those environments would allow gamers to write their own customized JavaScript code. Users could create their own levels, their own logic, etc.

Another advantage would be to speed the web browsing experience on handheld devices that have Power-based architectures.
The real problem is getting some support for doing this; we have not given up on Power ISA but our current products are all ARM-based.

I think this may be a candidate for a bounty on Power2People - I am sure many MorphOS and AROS users would appreciate a Javascript speedup in WebKit (OWB or Sputnik) when running on the Efika or Pegasos, and it might help PowerPC chips for information terminals become something of an option again.

_________________
Matt Sealey


Top
   
PostPosted: Wed Sep 29, 2010 3:40 am 
Offline

Joined: Wed Sep 29, 2010 1:55 am
Posts: 6
Location: Moscow
Hi all! Is anyone interested in topic still here?

I think the most perspective way to bring JIT on PowerPC is LLVM backend. I guess it could be very effective for x86 and x86_64 too, and there's a probability that in future LLVM JIT will be ported to other architectures like ARM or MIPS

I see two possible options: 1)translate existing bytecode into LLVM bytecode; 2)generate LLVM bytecode directly from JS. In latter case llvm-lua project could be used as example of llvm bytecode generator implementation


Top
   
 Post subject:
PostPosted: Wed Sep 29, 2010 8:40 am 
Offline

Joined: Tue Jun 02, 2009 3:36 pm
Posts: 5
I'm still interested in this topic.

Is there an LLVM JIT for PowerPC that you have in mind?


Top
   
 Post subject:
PostPosted: Thu Sep 30, 2010 12:56 am 
Offline

Joined: Wed Sep 29, 2010 1:55 am
Posts: 6
Location: Moscow
http://llvm.org/Features.html

"A Just-In-Time (JIT) code generation system, which currently supports X86, X86-64, PowerPC and PowerPC-64".

If it supported ARM today, I guess nobody would bother with in-house JIT engines :)

However, LLVM without JIT is available for other platforms: ARM, Thumb, SPARC, Alpha, CellSPU, PIC16 MIPS, MSP430, SystemZ, and XCore. So one may expect JIT will be ported to other platforms in future.


Top
   
 Post subject:
PostPosted: Thu Sep 30, 2010 3:23 am 
Offline

Joined: Wed Sep 29, 2010 1:55 am
Posts: 6
Location: Moscow
Quote:
An embedded JavaScript interpreter operating in those environments would allow gamers to write their own customized JavaScript code. Users could create their own levels, their own logic, etc.
Oh, I've missed this statement. Non-browser JS is quite another matter, and if you really need compiler, LLVM seems to be the best way to go.

However, not to demotivate you, but I'm in doubt if you really need JS compilation for game scripting - role of JS in this task is to call optimized native methods from compiled libraries. Also you may look on llvm-lua - Lua is popular in gamedev scripting. Also, PyPy seems to work on LLVM (http://llvm.org/ProjectsWithLLVM/#pypy)


Top
   
 Post subject:
PostPosted: Fri Oct 01, 2010 11:07 am 
Offline

Joined: Tue Jun 02, 2009 3:36 pm
Posts: 5
LLVM does look like a good back end for a JavaScript compiler/interpreter. Good idea. I'm going to look into doing this with V8.


Top
   
 Post subject:
PostPosted: Mon Oct 04, 2010 1:09 am 
Offline

Joined: Wed Sep 29, 2010 1:55 am
Posts: 6
Location: Moscow
I'm going to explore WebKit's JS engine


Top
   
 Post subject:
PostPosted: Mon Oct 18, 2010 7:37 am 
Offline

Joined: Wed Sep 29, 2010 1:55 am
Posts: 6
Location: Moscow
Another possibility is use of libJIT:

http://www.gnu.org/software/dotgnu/libj ... jit_1.html
http://code.google.com/p/libjit-linear- ... allocator/

And, as a last resort, assembler coding :) Recently WebKit was ported to ARM using this way


Top
   
 Post subject:
PostPosted: Mon Nov 08, 2010 3:47 am 
Offline

Joined: Wed Sep 29, 2010 1:55 am
Posts: 6
Location: Moscow
Hi Robin,
Do you have any progress? Maybe it's worth to register mailing list or IRC channel on this topic to keep in touch?


Top
   
 Post subject:
PostPosted: Fri Nov 12, 2010 11:43 am 
Offline

Joined: Tue Jun 02, 2009 3:36 pm
Posts: 5
Quote:
Hi Robin,
Do you have any progress? Maybe it's worth to register mailing list or IRC channel on this topic to keep in touch?
No progress as of yet, but my employer (Collabora Ltd.) allows its employees plenty of time for projects such as this one. So, I will eventually get to it, if no one else has. But, that may be months from now, given the amount of contract work that we have.

Anyone may feel free to contact me directly about this: robin@bateboerop.name

_________________
Robin Bate Boerop
http://shorestreet.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 19 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group