Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8597407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:54:23+00:00 2026-06-12T00:54:23+00:00

Javascript is everywhere and to my mind is constantly gaining importance. Most programmers would

  • 0

Javascript is everywhere and to my mind is constantly gaining importance. Most programmers would agree that while Javascript itself is ugly, its “territory” sure is impressive. With the capabilities of HTML5 and the speed of modern browsers deploying an application via Javascript is an interesting option: It’s probably as cross-platform as you can get.

The natural result are cross compilers. The predominant is probably GWT but there are several other options out there. My favourite is Coffeescript since it adds only a thin layer over Javascript and is much more “lightweight” than for example GWT.

There’s just one thing that has been bugging me: Although my project is rather small performance has always been an important topic. Here’s a quote

The GWT SDK provides a set of core Java APIs and Widgets. These allow
you to write AJAX applications in Java and then compile the source to
highly optimized JavaScript

Is Coffeescript optimized, too? Since Coffeescript seems to make heavy use of non-common Javascript functionality I’m worried how their performance compares.

Have you experience with Coffeescript related speed issues ?
Do you know a good benchmark comparison ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:54:24+00:00Added an answer on June 12, 2026 at 12:54 am

    Apologies for resurrecting an old topic but it was concerning me too. I decided to perform a little test and one of the simplest performance tests I know is to write consecutive values to an array, memory is consumed in a familiar manner as the array grows and ‘for’ loops are common enough in real life to be considered relevant.

    After a couple of red herrings I find coffeescript’s simplest method is:

    newway = -> [0..1000000]
    # simpler and quicker than the example from http://coffeescript.org/#loops
    # countdown = (num for num in [10..1])
    

    This uses a closure and returns the array as the result. My equivalent is this:

    function oldway()
    {
        var a = [];
        for (var i = 0; i <= 1000000; i++)
            a[i] = i;
        return a;
    }
    

    As you can see the result is the same and it grows an array in a similar way too. Next I profiled in chrome 100 times each and averaged.

    newway() | 78.5ms
    oldway() | 49.9ms
    

    Coffeescript is 78% slower. I refute that “the CoffeeScript you write ends up running as fast as (and often faster than) the JS you would have written” (Jeremy Ashkenas)


    Addendum: I was also suspicious of the popular belief that “there is always a one to one equivalent in JS”. I tried to recreate my own code with this:

    badway = ->
        a = []
        for i in [1..1000000]
            a[i] = i
        return a
    

    Despite the similarity it still proved 7% slower because it adds extra checks for direction (increment or decrement) which means it is not a straight translation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked on Google, and everywhere in the forums. Just learning JavaScript, so
Javascript I have code that will hide various sections in a MS CRM form
javascript with> var customer=document.getElementById('custList').value; and that works... Why does it work BUT... var customer=(form1.custList.value);
I'm trying to improve my Javascript coding style and have been reading that it's
The javascript console keeps showing Not a custom field name: username when its supposed
I've looking almost everywhere for a jQuery/JavaScript table paginator. I found a few but
Little problem about sending PHP array to javascript function, i did homework looked everywhere
I've looked everywhere, but it can't seem that you can change the background color
I have looked everywhere and it seems that it is currently not possible to
While building a Javascript-heavy web application, what is the best practice for naming CSS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.