Page 1 of 1
Curious about Javascript
Posted: September 11th, 2008, 11:58 am
by attesaarela
Has anybody tried how fast the new Javascript can run quant code? Before I get laughed out of the door, let me just remark, that Javascript is actually pretty close to Matlab as a language, and using Matlab isn't considered ridiculous. So the reason you'd see the first sentence as ridiculous is really that the primary application domain of Javascript is web coding at the moment. But back to the topic. What I'm really curious about is whether the new Javascript interpreter might actually run some scripts faster than Matlab right now if you just translated them into it.. I think I need to just try it myself.
Curious about Javascript
Posted: September 11th, 2008, 2:00 pm
by ArifJaffer
JavaScript itself is probably not going to be super-fast as it is wholly dependent on the browser being efficient, as well as which browser you use. If you are looking at Java script one piece of advice I can give having learnt the hard way is that you should definitely look at Ajax as it allows your code to be more efficient. Also you need to tie yourself to a browser early one as different browsers implement JS different ways.
Curious about Javascript
Posted: September 12th, 2008, 10:27 pm
by farmer
QuoteOriginally posted by: attesaarelaJavascript is actually pretty close to Matlab as a languageECMA script is very easy to convert to all the C-like languages. You can get 99.5% of the way with a few clever search-replaces.
Curious about Javascript
Posted: September 13th, 2008, 12:39 pm
by yuryr
You have plenty of algorithms implemented in mathlab. Now you want to run calculations in JS? What support does it have for matrices, Monte-Carlo etc...?
Curious about Javascript
Posted: September 13th, 2008, 1:09 pm
by attesaarela
QuoteOriginally posted by: yuryrYou have plenty of algorithms implemented in mathlab. Now you want to run calculations in JS? What support does it have for matrices, Monte-Carlo etc...?All the new JIT compiler research that has now been applied to Javascript is very interesting, I was just curious about the current performance of that..
Curious about Javascript
Posted: September 15th, 2008, 1:54 am
by spmacdonald
You may be interested in Steve Yegge's blog:
http://steve-yegge.blogspot.com/I know some fairly prominent googlers are into JavaScript... Norvig included.What do you think about F#?
Curious about Javascript
Posted: September 15th, 2008, 6:33 pm
by attesaarela
QuoteOriginally posted by: spmacdonaldYou may be interested in Steve Yegge's blog:
http://steve-yegge.blogspot.com/Yes, brilliant stuffQuoteI know some fairly prominent googlers are into JavaScript... Norvig included.What do you think about F#?I'm really interested in dynamically typed languages at the moment, like Matlab, which make it really easy to develop small applications quickly..F# is a great language, but it is statically typed which means it may not be quite as convenient as eg Matlab for some things.. It really is possible that, like Steve Yegge says, many dynamically typed languages are going to get a lot faster soon when the new optimization techniques become more widely known..
Curious about Javascript
Posted: September 15th, 2008, 7:25 pm
by spmacdonald
While you are correct in saying F# is statically typed, that is not the whole story (note, I do not pretend to know the whole story either... from the faq:One of the striking features of F# is its combination of dynamic and static features. For example, F# Interactive provides a strikingly powerful dynamic compilation environment, where dynamically entered code is executed using the full performance power of high-quality native code. I have played with this a bit, and it really is _very_ useful. Essentially you now have a REPL environment to write .NET code in... amazing stuffI have used matlab for years, and still do daily... but the more I learn about C#/F#/Python the less I like using matlab... just my 2 cents