From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 66B0B1F5B1 for ; Mon, 20 Jul 2020 11:53:08 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id g75so21959626wme.5 for ; Mon, 20 Jul 2020 04:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopify.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=q2+PTVuIuYoKcn87z5CfKtAoDxFK7NwYS+jNChHP4Bk=; b=j3UBsCmUJb9tZouRb/1nvsX3kx7MqP63vGdD01nVV+Z4XvQzIaBjV2gCprTUVqx0hj kcWOL/1l4ZwoSfp2HFaIgTC+7k9Y1TQJKuvdd7KbeHfW67BCw5ERgOwWA5VNAnZkPmJX zmdUeAtYlFo6CzsPr8oJNEMrZmf9tjshjFUGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=q2+PTVuIuYoKcn87z5CfKtAoDxFK7NwYS+jNChHP4Bk=; b=RKnfoOiIkXb4T6hbOew1FKxRzOv8eJ6fvg1TBh/Pp+iGNNUWj2t0Re4FX8uPlgAF8M uIfdDPBKC7NStRpt4Ra8pQhJRUl4fiBO82XJVYsupQJcj2fC+O+DoXzUOO0jtyHQwVh7 TpwaTsp7ihuJkeuE5y4iPRT4Rvrngj9ArCMGcUMyfKHmRTabmbngvnjAYA2k8tlO3yLu S9UhBKFh9H2UUD27iffLLJiugjDFvgKtqLLGD/j8bVIGv/XTAwtRc6k+92IzgjaLdVqr LpEYvkAvfe0tL6oU4l8/uSFibHxZp5JOnQ1zfrO2aLXVTaPaDiWtKNj318NWCjT8ydwA 8lMg== X-Gm-Message-State: AOAM532PIIa9VfsLij3DC5hOXvTx2me76chOztQZK4lIlpQH48xC3am9 /Fr+sS93R6WQQ5AaLFsZVIISOZn01qo= X-Google-Smtp-Source: ABdhPJyHRz1HfZz2LK5L930u/2ToK/KwSKmw6tzsx2hfrr2Vrx9QnRLPNJBMI56Y5Nf++zwVcdL/TQ== X-Received: by 2002:a1c:5986:: with SMTP id n128mr20303931wmb.112.1595245986190; Mon, 20 Jul 2020 04:53:06 -0700 (PDT) Received: from [192.168.0.12] (87-231-62-161.rev.numericable.fr. [87.231.62.161]) by smtp.gmail.com with ESMTPSA id 62sm16669817wrq.31.2020.07.20.04.53.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2020 04:53:05 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH] Add early hints support From: Jean Boussier In-Reply-To: <20200720105538.GA13340@dcvr> Date: Mon, 20 Jul 2020 13:53:04 +0200 Cc: unicorn-public@yhbt.net Content-Transfer-Encoding: 7bit Message-Id: <4274A592-FC06-4886-8013-429ABF689695@shopify.com> References: <058BA238-BEB3-4E54-9DE6-DC59BCB86246@shopify.com> <20200716105037.GA26605@dcvr> <242F0859-0F83-4F14-A0FF-5BE392BB01E6@shopify.com> <20200716121643.GA26942@dcvr> <20200717011955.GA23522@dcvr> <624157B8-884C-42EB-8515-AFC6807D6F8D@shopify.com> <20200720100958.GA7043@dcvr> <20200720105538.GA13340@dcvr> To: Eric Wong X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: > upcase seems VERY compelling in a micro benchmark since it can > go straight into opt_case_dispatch. But I worry the extra > garbage might have a different effect in a real app, especially > with more headers. It is indeed debatable. The thing is that on match, that Regexp will generate a MatchData and a garbage string. So I'd think the extra GC pressure would be totally negligible. But I agree it's hard to tell without a larger more representative benchmark. > Maybe: > > (val || ''.freeze).include?("\n".freeze) > > Can work for those buggy apps, though... Yes. or: vall && val.include?...