Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
try ... catch performance
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
alphanull  
View profile  
 More options Nov 1 2012, 11:28 am
From: alphanull <kuderm...@alphanull.de>
Date: Thu, 1 Nov 2012 08:28:23 -0700 (PDT)
Local: Thurs, Nov 1 2012 11:28 am
Subject: try ... catch performance

Hello,

I just poked around the Q source a bit and saw that there are quite a lot
of try ... catch blocks to catch any errors. Now, this can be quite a
performance impact on certain browsers. Also interesting is that this
penalty seems to occur mainly when using try/catch  _inside_ a function,
like it is generally done in Q. Now, if you could move these blocks so that
they are _outside_ of a function call this could result in a perfiormance
increase.

For the raw Numbers, take a look at this:
http://jsperf.com/try-catch-performance-overhead

Maybe this particular optimization would also make sense for Q?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kris Kowal  
View profile  
 More options Nov 1 2012, 12:56 pm
From: Kris Kowal <kris.ko...@cixar.com>
Date: Thu, 1 Nov 2012 09:56:11 -0700
Local: Thurs, Nov 1 2012 12:56 pm
Subject: Re: [Q] try ... catch performance

> For the raw Numbers, take a look at this:
> http://jsperf.com/try-catch-performance-overhead
> Maybe this particular optimization would also make sense for Q?

I think you’ll find that Q already benefits from this optimization on
its hot code-paths. Except for our code that handles exception
formatting, every try/catch block in Q rapidly delegates to a
callback.

Kris Kowal


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »