Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93390 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66311 invoked from network); 18 May 2016 03:06:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2016 03:06:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.213.177 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.213.177 mail-ig0-f177.google.com Received: from [209.85.213.177] ([209.85.213.177:35587] helo=mail-ig0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/97-11000-C1CDB375 for ; Tue, 17 May 2016 23:06:04 -0400 Received: by mail-ig0-f177.google.com with SMTP id bi2so86519696igb.0 for ; Tue, 17 May 2016 20:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=w3qNBTJm5AIluK8Je9AWoF3IWi6/lENZFmDbKiBVgSo=; b=IImp9dDWAHOtg97hsIGtjkUgwEJD8Ev6F/d2WK1CY6HSjwA5lTd/GIFxQ8hInSh3h+ 7L6bLwFW7hcuWrOC+XBa2tOnB9v+dxid3X9QHABCql9n1UTW6CYV7nVm4Y8X3Tj2z8sr VZtSQllQCMmK4UpBJmX3NK605j1mmQxXSv3ye2FDbdUEefQCIK2aD5Z/h5Cmffo/W3Gv RC8B3cDdOIcurz4YNCj4+/aL9BERFEgHyU+Mq+xkMifhMaVEr+DJELZRJNoVqruyVxJ/ S2bsdjmePpfgOanSxuis+H+HjfwOjWZa983RCedKLsBf2x1yXkXwzbEVgTPtzm9BFAKo LtVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=w3qNBTJm5AIluK8Je9AWoF3IWi6/lENZFmDbKiBVgSo=; b=HKlp+b6TdJHgJFZQjJOTXRGiQOHJo6FyY3Rj6TRRG1ofwuQMuGTl3+Hwfbir+sVE7o QKpCRUi6tMTlOAU0HGiC3yRTzoGY+y8N/SSvCxAz0S04egrijWnjvBNbC45HcRc8d0oI lfAnYAUVoQ96lUgUjjhA1rOLMqZwTvLRWGH2ESy+bPbeCpThJOaOcT7G/34/iFN+sTfr 45RNGCFxUWUyH++x8lx1qFrxeaKGXb7Aiaf1+cu52PIh/ZCkMX3hLs0igy7tmUcs7O7p AiZRb6+0eFwiDLn11FMal+2BhmvrVI8X8DxHyCTp8RiRm47SgdJKBWoTWoO9DUEVTQ2V Jdhg== X-Gm-Message-State: AOPr4FWjPuBjv4baEeXeqv4TQJE8zABxSVj7aHNPOigbcZ7vYYpzc62mpQakMXaG49eCHxak7PRuep3FiUZyLw== MIME-Version: 1.0 X-Received: by 10.50.186.163 with SMTP id fl3mr15613817igc.27.1463540762006; Tue, 17 May 2016 20:06:02 -0700 (PDT) Sender: php@golemon.com Received: by 10.36.9.67 with HTTP; Tue, 17 May 2016 20:06:01 -0700 (PDT) X-Originating-IP: [107.198.91.68] In-Reply-To: References: Date: Tue, 17 May 2016 20:06:01 -0700 X-Google-Sender-Auth: DSbMTfr7d2FQSMX7kEMP9WzpcBg Message-ID: To: Jesse Schalken Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Do symbol references always go through a hash table? From: pollita@php.net (Sara Golemon) On Tue, May 17, 2016 at 7:51 PM, Jesse Schalken wrote: > Does that mean a function which accepts an instance of an interface and > calls a method on it will have to do a full lookup of the method whenever > the concrete class isn't the same as when that function was first executed? > (or was last executed, depending on how the cache works) > Yes, but that doesn't mean you should micro-optimize around it. Just write code that's easy to maintain and trust the compiler to do the best job at making it not-slow. :) -Sara