Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

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