The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 9 of 9

Thread: Tutorials: Functions in JavaScript

  1. #1

    Tutorials: Functions in JavaScript

    Hi everyone,
    This is the happening place to discuss all things related to the Functions in JavaScript tutorial. If you want to be cool, you know you want to read it.

    Cheers,
    Kirupa

    Great, now even Kirupa is { facebooking | twittering }

  2. #2
    TheCanadian's Avatar
    10,305
    posts
    Noo doot aboot it, eh?
    The equation at the start is wrong. The text description is correct though.
    Proud Montanadian
    We tolerate living and breathing. And niches.

    Name Brand Watches

    Maybe getTimer() or TweenMax is the answer to your problem . . .

  3. #3
    975
    posts
    Registered User
    In general, how does the speed of javascript compare to actionscript? loops, functions, rendering?

  4. #4
    Quote Originally Posted by TheCanadian View Post
    The equation at the start is wrong. The text description is correct though.
    Thanks for pointing that out. That was such an embarrassing mistake to make

    Quote Originally Posted by tbo View Post
    In general, how does the speed of javascript compare to actionscript? loops, functions, rendering?
    I really don't know, but I would guess comparable. JS performance in all of the recent crops of browsers has gotten much better than what it was in the past, but that isn't saying much. JS performance in the past was abysmal and AS was significantly faster.

    Great, now even Kirupa is { facebooking | twittering }

  5. #5
    Quote Originally Posted by tbo View Post
    In general, how does the speed of javascript compare to actionscript? loops, functions, rendering?
    AS is compiled, JS is not - AS should always be 'faster'. If you were looking to reproduce something you previously developed in flash you trade off some speed to remove reliance on a run time environment (plugin) and gain the benefits of interacting directly with the browsers dom.

    The speed of javascript relies on the browser (in part). The current crop of Mozilla, Opera, Chrome have all benchmarked quite high, I wish I had a link handy to show for some numbers but there are significant improvements over older generation browsers. The rest of the speed is up to the users device hardware.

  6. #6
    Google's V8 has crankshaft, which compiles JavaScript into native machine code before execution.

  7. #7
    Quote Originally Posted by kadaj View Post
    Google's V8 has crankshaft, which compiles JavaScript into native machine code before execution.
    Basically all modern/competitive JavaScript engines (JavaScriptCore, SpiderMonkey, Chakra, V8) compile to native machine code before execution.

  8. #8
    Quote Originally Posted by kadaj View Post
    Google's V8 has crankshaft, which compiles JavaScript into native machine code before execution.
    ... which has to be done on the fly.

    Don't get me wrong I'm not a flash fanboy, I just think it's unfair to compare performance between the 2. Apples and Oranges...

  9. #9
    TheCanadian's Avatar
    10,305
    posts
    Noo doot aboot it, eh?
    Quote Originally Posted by ironikart View Post
    ... which has to be done on the fly.

    Don't get me wrong I'm not a flash fanboy, I just think it's unfair to compare performance between the 2. Apples and Oranges...
    I don't think comparing the speed of two quite similar languages that fill a similar niche is like apples and oranges at all. AS (or rather ABC) is compiled to machine code on the fly too. I also seem to remember sen saying that JS is faster.
    Proud Montanadian
    We tolerate living and breathing. And niches.

    Name Brand Watches

    Maybe getTimer() or TweenMax is the answer to your problem . . .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012