Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9389C1042D for ; Fri, 3 Jan 2014 03:43:14 +0000 (UTC) Received: (qmail 72308 invoked by uid 500); 3 Jan 2014 03:43:13 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 72282 invoked by uid 500); 3 Jan 2014 03:43:12 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 72274 invoked by uid 99); 3 Jan 2014 03:43:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 03:43:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [50.198.33.210] (HELO mail.digitalprimates.net) (50.198.33.210) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 03:43:04 +0000 Received: from DPSBS1.digitalprimates.local ([fe80::5823:d1b4:86c2:3ad0]) by DPSBS1.digitalprimates.local ([fe80::5823:d1b4:86c2:3ad0%22]) with mapi id 14.02.0387.000; Thu, 2 Jan 2014 21:42:37 -0600 From: "Michael A. Labriola" To: "dev@flex.apache.org" Subject: RE: try/catch vs in Thread-Topic: try/catch vs in Thread-Index: AQHPCCLcocWxLkHpPEGh6fyhPdHyIppyWxPg Date: Fri, 3 Jan 2014 03:42:37 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [24.12.91.54] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org >I know "in" can be expensive but so is try catch. I've run each though sco= ut and it looks like the in operator is orders of magnitude faster and caus= ed no garbage collection both when the field exists and when it >doesn't. A= nyone have any insight/something to add? Any chance data can be null at that point? Does your code handle that well?= If you are good on those fronts I think it's a very positive change. I hat= e when try/catch is used in this way. Mike