From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from mail-qg0-f62.google.com (mail-qg0-f62.google.com [209.85.192.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B339020179 for ; Fri, 17 Jun 2016 19:43:57 +0000 (UTC) Received: by mail-qg0-f62.google.com with SMTP id z21sf30638331qge.1 for ; Fri, 17 Jun 2016 12:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=eXFyWLYSRzLSAtQLSGaTUna9fhsqQsOlev1cSs2P1zA=; b=YGRsnTDopeoOH4RQTgQFtp6s7DPqDfQK8rUh+9SAwdsyZdHVR2WDml+QEuEBrrxID1 9++FN/rm34U2d//wZmeHBPT4yYMi5wCBmoDWdp27uuiPdXslRJzgqtpUG+ybyGQFSI3h //VutzpfyRq1BrjgCofdWyKFNLT+WDWMWn7zOO+HQcesorgO+c9RQ+1jAn3xV7zFyWuk ds3OVbJ6JBRcw+x9dgxZhFcrbCZwpGO/M/XsEbQqrkVK1cySqL5ZcXPlgPs+V9suGilf yP7MaTi/vq8sSuluF6ZMVv9aHvPLTc9CXrOOywjLixVxbW1PawFcoNGEdV4PZcyRUpl1 jdTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=eXFyWLYSRzLSAtQLSGaTUna9fhsqQsOlev1cSs2P1zA=; b=U24NKE3zPMW9PPlQAdMFQCvGJdwcbFG49tlg/iWV5FheFboUF2qrw17sr6p5nXH5Ye 5Y6nTqT92ax3bTbMEyRVJY5xrkxVcloEjg88ay7+nqPqq6dATnALbdzASRSdKcRcWAbo afjOn8fKnCSQzYPPd0HbF2YHy0A5p9XOO4IGH+rorSChDTH7AZCyyyBpHwQ7QLsNWrNc puma7iBy6lpZnMNQbOPQwTe9X///RD6pg49VZ3V8jYUOCytMgirrQDSV5U0GvQxq0iMj eZSP2gNqoAmcr2Fbg2Df2Y06X4rZUDGlXZNZXJCW2FJj/etDs5HYogwiaIfVwweV7h3J uchw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=eXFyWLYSRzLSAtQLSGaTUna9fhsqQsOlev1cSs2P1zA=; b=hWfEYIuuBkdRaEGz0zMpAdI0uF3YzNIkABsjRp1IXRvT76ndmQ7yMMMtOG9CMRDmlo MZQaKQUHib+j5kFMZExIZhXOo8k/oVikNskBDwDMuIM9e00ST77u2g++mwjZ2ymsvc5r BybmUp1naqjxdLVwBSMHdG3l1J3WKH5Clo/VFdhs/ZGo1t3hpYIPaaQOwlqxGybPNVyJ /m3AZSJXLLmrFk+lWb2EDldfC/7aYPBo1T5QxGdOuxmiYGPxfCqcukmrNlrCQmk7Q+n4 65LWxx7NBVhFEwWA26O37miCcZOuSpnPQYiyzwuUwLKUOvnE6+KoWdhyLYnInDpFi/ww ANJw== Sender: rack-devel@googlegroups.com X-Gm-Message-State: ALyK8tJsaAt90tOrWv74DC6UEXbYnUtE2aEvKYuF1+x6bIXZUGYIUkhJOgs1Av2jsog14Q== X-Received: by 10.36.81.79 with SMTP id s76mr12936ita.9.1466192636677; Fri, 17 Jun 2016 12:43:56 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.107.2.216 with SMTP id 207ls1167858ioc.61.gmail; Fri, 17 Jun 2016 12:43:56 -0700 (PDT) X-Received: by 10.107.181.193 with SMTP id e184mr9974780iof.17.1466192636252; Fri, 17 Jun 2016 12:43:56 -0700 (PDT) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com. [2607:f8b0:4003:c06::231]) by gmr-mx.google.com with ESMTPS id a3si12694itd.2.2016.06.17.12.43.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 12:43:56 -0700 (PDT) Received-SPF: pass (google.com: domain of richard.schneeman@gmail.com designates 2607:f8b0:4003:c06::231 as permitted sender) client-ip=2607:f8b0:4003:c06::231; Received: by mail-oi0-x231.google.com with SMTP id v7so20521625oig.2 for ; Fri, 17 Jun 2016 12:43:56 -0700 (PDT) X-Received: by 10.202.232.199 with SMTP id f190mr2549291oih.168.1466192636025; Fri, 17 Jun 2016 12:43:56 -0700 (PDT) Received: from Richards-MacBook-Air.local (72-48-77-213.dyn.grandenetworks.net. [72.48.77.213]) by smtp.gmail.com with ESMTPSA id h94sm2005459oth.21.2016.06.17.12.43.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2016 12:43:55 -0700 (PDT) Date: Fri, 17 Jun 2016 14:43:54 -0500 From: richard schneeman To: Aaron Patterson , Eric Wong Cc: rack-devel@googlegroups.com Message-ID: In-Reply-To: <20160513234135.GA24167@dcvr.yhbt.net> References: <20141003200836.GA4664@dcvr.yhbt.net> <20141005081525.GA8997@dcvr.yhbt.net> <20160512030454.GA10916@dcvr.yhbt.net> <20160512165456.GA79225@TC.local> <20160513234135.GA24167@dcvr.yhbt.net> Subject: Re: Less allocated objects on each request X-Mailer: Airmail (329) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="576452fa_27674586_270f" X-Original-Sender: richard.schneeman@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com; spf=pass (google.com: domain of richard.schneeman@gmail.com designates 2607:f8b0:4003:c06::231 as permitted sender) smtp.mailfrom=richard.schneeman@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , --576452fa_27674586_270f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I have a PR that removes all those constants in rack.rb in favor of string = literals: https://github.com/rack/rack/pull/1085 I also found some places where we should still use `.freeze` in a few cases= . There are also some other constants buried around the project, this PR is= only the main constants. Eric & Aaron: on a separate non-rack note, I could use some of your Ruby in= ternals expertise on a performance tuning patch to Sprockets involving `cas= e`. Mostly why is the `case` code not faster than using a hash. Here is the= discussion:=C2=A0 https://github.com/rails/sprockets/pull/312#issuecomment-226369234 --=C2=A0 Richard Schneeman http://schneems.com On May 13, 2016 at 6:41:36 PM, Eric Wong (e@80x24.org) wrote: Aaron Patterson wrote: =20 > Yes please! If you have time. Otherwise I can take care of it. =20 Much appreciated if you or Richard do; I'm busy with non-Ruby stuff, =20 but I can help with any VM-related questions you might have. =20 Thanks. =20 --=20 ---=20 You received this message because you are subscribed to the Google Groups "= Rack Development" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-devel+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. --576452fa_27674586_270f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =
I have a PR that removes all those constants in ra= ck.rb in favor of string literals:


I also found some places where we should still use `.freeze` in a few = cases. There are also some other constants buried around the project, this = PR is only the main constants.

= Eric & Aaron: on a separate non-rack note, I could use some of your Rub= y internals expertise on a performance tuning patch to Sprockets involving = `case`. Mostly why is the `case` code not faster than using a hash. Here is= the discussion: 

https://github.com/rails/sprockets/pull/312#issuecommen= t-226369234

-- 
Richard Schneeman


On May 13, 2016 at 6:41:36 PM, Eric Wong (e@80x24.org) wrote:

Aaron Patterson <tenderlove@ruby-lang.or= g> wrote:
> Yes please! If you have time. Otherwise I can take care of it.

Much appreciated if you or Richard do; I'm busy with non-Ruby stuff,
but I can help with any VM-related questions you might have.
Thanks.

--

---
You received this message because you are subscribed to the Google Groups &= quot;Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-dev= el+unsubscribe@googlegroups.com.
For more options, visit http= s://groups.google.com/d/optout.
--576452fa_27674586_270f--