From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.7 required=3.0 tests=AWL,BAYES_00,FREEMAIL_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=ham version=3.3.2 Path: news.gmane.org!not-for-mail From: "=?utf-8?b?0K7RgNC40Lkg0KHQvtC60L7Qu9C+0LI=?=" Newsgroups: gmane.comp.lang.ruby.kgio.general Subject: Re: [PATCH 2/3] use rb_str_subseq for tail string on write Date: Wed, 30 May 2012 23:29:44 +0400 Message-ID: References: <1338386216-14568-1-git-send-email-funny.falcon@gmail.com> <1338386216-14568-2-git-send-email-funny.falcon@gmail.com> <20120530185725.GA17661@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: dough.gmane.org 1338406213 1556 80.91.229.3 (30 May 2012 19:30:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 May 2012 19:30:13 +0000 (UTC) To: kgio@librelist.com Original-X-From: kgio@librelist.com Wed May 30 21:30:11 2012 Return-path: Envelope-to: gclrkg-kgio@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: kgio@librelist.com Xref: news.gmane.org gmane.comp.lang.ruby.kgio.general:160 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SZoai-0007Kq-DP for gclrkg-kgio@m.gmane.org; Wed, 30 May 2012 21:29:56 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 01BF821DD03 for ; Wed, 30 May 2012 19:37:48 +0000 (UTC) Content-Transfer-Encoding: 7bit X-Content-Filtered-By: PublicInbox::Filter 0.0.1 2012/5/30 Eric Wong > Sokolov Yura 'funny-falcon wrote: > > Use rb_str_subseq for taking string's tail. rb_str_subseq do not allocate > > additional memory in this case. And although it prevents from collecting > > original string, it seems that tests wins both in performance and in > memory > > usage. > > > > Use fallback to rb_str_substr on ruby1.8 > > Thanks, applied (along with your PATCH 1/3). Will push. > Looking at 3/3 now. > > By the way, do you test under Rubinius? I haven't in a while, but it > looks like rb_str_substr() works in rbx. > Oh, I didn't test under Rubinius, only REE and 1.9.3p194