Re: [sip-ops] [dispatch] SIP-CLF: Results on ASCII vs. binary representation

Simon Perreault <simon.perreault@viagenie.ca> Thu, 30 April 2009 20:53 UTC

Return-Path: <simon.perreault@viagenie.ca>
X-Original-To: sip-ops@core3.amsl.com
Delivered-To: sip-ops@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 2C20F3A6F8E; Thu, 30 Apr 2009 13:53:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.255
X-Spam-Level:
X-Spam-Status: No, score=-2.255 tagged_above=-999 required=5 tests=[AWL=0.345, BAYES_00=-2.599, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b0zbChykjIhP; Thu, 30 Apr 2009 13:53:13 -0700 (PDT)
Received: from jazz.viagenie.ca (jazz.viagenie.ca [IPv6:2620:0:230:8000::2]) by core3.amsl.com (Postfix) with ESMTP id 0E3AC3A6C6F; Thu, 30 Apr 2009 13:53:13 -0700 (PDT)
Received: by jazz.viagenie.ca (Postfix, from userid 8) id C9EEF14A000B; Thu, 30 Apr 2009 16:54:35 -0400 (EDT)
Received: from ringo.viagenie.ca (ringo.viagenie.ca [IPv6:2620:0:230:c000::67]) by jazz.viagenie.ca (Postfix) with ESMTP id BCEB814A0001; Thu, 30 Apr 2009 16:54:35 -0400 (EDT)
Message-ID: <49FA100B.2050105@viagenie.ca>
Date: Thu, 30 Apr 2009 16:54:35 -0400
From: Simon Perreault <simon.perreault@viagenie.ca>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: "Vijay K. Gurbani" <vkg@alcatel-lucent.com>
References: <49F864E8.20005@alcatel-lucent.com>
In-Reply-To: <49F864E8.20005@alcatel-lucent.com>
X-Enigmail-Version: 0.95.6
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: sip-ops@ietf.org, dispatch@ietf.org
Subject: Re: [sip-ops] [dispatch] SIP-CLF: Results on ASCII vs. binary representation
X-BeenThere: sip-ops@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: SIP Operations <sip-ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/sip-ops>, <mailto:sip-ops-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sip-ops>
List-Post: <mailto:sip-ops@ietf.org>
List-Help: <mailto:sip-ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sip-ops>, <mailto:sip-ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Apr 2009 20:53:14 -0000

Vijay K. Gurbani wrote, on 29/04/09 10:32 AM:
> Time taken to seek to the last record of the CLF file:
>   Binary CLF:   3.08s
>   ASCII CLF:   16.55s (using perl v5.6.1)
>                42.92s (using perl v.5.8 and v5.10)

On my system I have Perl 5.10.0.

Initially:  26.33s

By eliminating the regexp loop: 16.66s (1.58x faster)

while (<LOGFILE>) {
    chomp;
    @fields = /[^" ]+|".*?"/g;
    ...

And I'm surprised nobody mentioned already that C would be MUCH faster than Perl.

I think that speed is not an issue in text vs binary.

Simon
-- 
STUN/TURN server    --> http://numb.viagenie.ca
Interplanetary news --> http://reeves.viagenie.ca
vCard 4.0           --> http://www.vcarddav.org