Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105761 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88829 invoked from network); 20 May 2019 21:38:16 -0000 Received: from unknown (HELO mail-io1-f44.google.com) (209.85.166.44) by pb1.pair.com with SMTP; 20 May 2019 21:38:16 -0000 Received: by mail-io1-f44.google.com with SMTP id e19so11889521iob.3 for ; Mon, 20 May 2019 11:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AufvSAuDWKpmLiURZnMWLE/SGcFTVeeAuKPOaSgNhyg=; b=U6QQaH+rruz4hEw/tBsRabOn9bESgoP+SQh0NTzUJ5nlTM9VroGTeLB1EJC4+xK/Bo WsZEcboNbhvpzq/Mnlu0KnZ7emTIRYA2U7wO3QqhmMKPgoXXzZ97f6XZi8XDJg85Qkvi ABZPwoPOXg5GYFpwXGt3++SljdzjRNj/3KVSZAB1bh06BPpSmABHQn6T/awvGRMQSA3c J6YrULX80SJPreClZAZm6vae9fX3Nq8BI9dGC5Y4v4RWAxoPNatDypIDW7DkDb3TCIsh 9a1T6/VfAgRnUJekd4IXlVM4a0Ih61zfjZuoSweOvJqRMGnvBRvrolp+x3YkL7CTOK3+ i56A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AufvSAuDWKpmLiURZnMWLE/SGcFTVeeAuKPOaSgNhyg=; b=mzHu7lQXuVE0OhcxXAq6vKinfgml0EPhWiRlEESPuiEplZL4HPbtANZgN3OXIQFFkS 5ERkPbucJ6HiggzZ6gbQMK6E00lt3KgYzX6/ZQFYaQwX733dbcrZ1R7UsPHyTKUE9PCp RuQWnjHBal6apu7Am91fcRkwIa7aI7rNnx9QLnhenzCG9D9KwbBbwGwlJiefQnYfmDEZ mZnfGbwohC+jvMix+VTJPKHfEF08WiSp8EuxWx3n+wJ4njALSKiqR/feBh5whKmD9btz zq7ITP1PichOnEhrECA/eId1vs1rohgKICf0sdNFf8Kd2ZVMy3DnTF5jsyiP/ZpomLfR BATg== X-Gm-Message-State: APjAAAV65gVcAViOB+xwDK2vtu/j7L5SqJQUQqq2kKpYWM7OPyzZsAkF bL4N4FDdXl4ouL2vNMIr7sEULuzNYzcJvBd/gX0= X-Google-Smtp-Source: APXvYqxEXL6uViT2xlA9rKO+jRAXtvZKzR2K0pTEz6dmC/Eh5ooYhqmiSe3ZkT7DLaWhaG5MfnvD1ekje+qJZrecm1I= X-Received: by 2002:a5d:9d91:: with SMTP id 17mr15749855ion.35.1558377928654; Mon, 20 May 2019 11:45:28 -0700 (PDT) MIME-Version: 1.0 References: <16ad66607a0.27c1.08be835b7d1a2c2edb4c4286afe1a236@gmail.com> In-Reply-To: <16ad66607a0.27c1.08be835b7d1a2c2edb4c4286afe1a236@gmail.com> Date: Mon, 20 May 2019 20:45:16 +0200 Message-ID: To: Gabriel Ostrolucky Cc: Theodore Brown , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000dd05590589562232" Subject: Re: [PHP-DEV] High performance function autoloading From: ocramius@gmail.com (Marco Pivetta) --000000000000dd05590589562232 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 20 May 2019, 20:01 Gabriel O, wrote: > > On 20 May 2019 7:17:58 PM Theodore Brown wrote: > > > Every time function autoloading been brought up in the past, there > > have been concerns about performance issues when calling a global > > function from inside a namespace. E.g. calling `strlen` in a loop > > would become far slower if every call has to trigger the autoloader. > > This trick for perf improvement is overblown. It's misconception that it > does provide speed advantage for most functions and reasons behind it. It > does so only for those implemented as opcodes. People started to abuse it > by importing ALL functions. Such overzealous approach completely prevents > useful things like function mocking. > Disabling function mocking is good =C2=A9=EF=B8=8F It was a terrible practice in first place, and it is usually done for impure functions that should be wrapped in integration-tested adapters. --000000000000dd05590589562232--