Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105760 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87026 invoked from network); 20 May 2019 21:35:44 -0000 Received: from unknown (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (40.92.4.70) by pb1.pair.com with SMTP; 20 May 2019 21:35:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iWRT1SDQjYKC5XPUjv7QwtUXDCYezbgqnlwTNum08SA=; b=GtBlcQSqR58GgpfygxALmZq5gYf6Ne+Z1amQLkgkTPIcc6IW1bl1zB3nH+Oh4XZYIdD1jm30RzJZLVDqpIIlGx1C8kWo1F51H29PJwGiYW6LvjmMCNO2CZ3Ex+0Ape3r+Xx2OAY3A7qg+mk4LaUYjNis+45e+w8Bb8yRMM+xIQ2ZREj+YYDeKPo9Dpahxk5fU3N77pc6NNsbD2JHnAtMT421AnM0oyVo63CXnAL0NyTYRUdMVkvjjUcaSmJEBFd1+zNt6uAyjisIdRH77QDu5gPwXwJOwNXwK2Eqgf9aDxHNDz0QJUcDY2pDu5JxbJHMo5kTWhKZEPcQJ7/9OCi9Iw== Received: from BL2NAM02FT057.eop-nam02.prod.protection.outlook.com (10.152.76.59) by BL2NAM02HT200.eop-nam02.prod.protection.outlook.com (10.152.76.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1900.16; Mon, 20 May 2019 18:42:55 +0000 Received: from DM5PR06MB2857.namprd06.prod.outlook.com (10.152.76.56) by BL2NAM02FT057.mail.protection.outlook.com (10.152.77.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1900.16 via Frontend Transport; Mon, 20 May 2019 18:42:55 +0000 Received: from DM5PR06MB2857.namprd06.prod.outlook.com ([fe80::8c9a:8f50:c23:76a5]) by DM5PR06MB2857.namprd06.prod.outlook.com ([fe80::8c9a:8f50:c23:76a5%5]) with mapi id 15.20.1900.020; Mon, 20 May 2019 18:42:55 +0000 To: Gabriel O , PHP internals Thread-Topic: [PHP-DEV] High performance function autoloading Thread-Index: AQHVDy+ySrd8q1/GuEiFhoiHIw5ZMaZ0TZWAgAABNxY= Date: Mon, 20 May 2019 18:42:55 +0000 Message-ID: References: ,<16ad66607a0.27c1.08be835b7d1a2c2edb4c4286afe1a236@gmail.com> In-Reply-To: <16ad66607a0.27c1.08be835b7d1a2c2edb4c4286afe1a236@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:86B8E7E08FB81B5E80946B34023CFAE1754B94A0243286F8CB9AC6E55F1D7D64;UpperCasedChecksum:2F062337BF483462B2C208F87C87F4A7BB97C9A632ED0688EE3F310ABA6E2133;SizeAsReceived:6848;Count:43 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [mLowtm6hU0PBm8PksaS82FemL0Wcer89] x-ms-publictraffictype: Email x-incomingheadercount: 43 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:BL2NAM02HT200; x-ms-traffictypediagnostic: BL2NAM02HT200: x-microsoft-antispam-message-info: uIV4jIa76WiKM8X+nbTgpxwI6TLQXCvfD4k7FnXzhMdiRCMbsmqmpD6rAe2wl1hpmEdUswfz5uB2hK7gZntwd9zLTt8d7eFFTn/9yS/F1TOECv3+OllrqI9NwpAmd093LScJgoFF4YqXz21RmHnYXJ0jhQwl9nHQ5ccph6alnh60snP1ZdEKUBXthxeszWmA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 512440bb-16dd-4b08-a92a-08d6dd52f92b X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2019 18:42:55.6538 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT200 Subject: Re: [PHP-DEV] High performance function autoloading From: theodorejb@outlook.com (Theodore Brown) On Mon, May 20, 2019 at 1:00 PM Gabriel O wrote:=0A= =0A= > > Every time function autoloading been brought up in the past, there=0A= > > have been concerns about performance issues when calling a global=0A= > > function from inside a namespace. E.g. calling `strlen` in a loop=0A= > > would become far slower if every call has to trigger the autoloader.=0A= > =0A= > This trick for perf improvement is overblown. It's misconception that it= =0A= > does provide speed advantage for most functions and reasons behind it. It= =0A= > does so only for those implemented as opcodes. People started to abuse it= =0A= > by importing ALL functions. Such overzealous approach completely prevents= =0A= > useful things like function mocking.=0A= =0A= Can you clarify? I'm not sure what performance improvement trick you=0A= are referring to, or what you mean by "importing all functions". Are=0A= you saying it's a misconception that triggering an autoloader on=0A= unqualified function calls in a namespace will slow down performance?=0A= As I understand it, this is the roadblock for function autoloading.=0A= =0A= Best regards,=0A= Theodore=