Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2349 invoked from network); 3 Jun 2015 14:29:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jun 2015 14:29:59 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.216.179 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.216.179 mail-qc0-f179.google.com Received: from [209.85.216.179] ([209.85.216.179:33098] helo=mail-qc0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/70-32628-66F0F655 for ; Wed, 03 Jun 2015 10:29:59 -0400 Received: by qcmi9 with SMTP id i9so4603610qcm.0 for ; Wed, 03 Jun 2015 07:29:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=yOZZY0pb3WpDnWZpHpiMyqzDN8froO7pV5O4h3SmFgs=; b=OoTRgaMdkKIYINJR1Yqh21WjQhjGpBfg5tfm5kEg8b9MhiizgFRbGM+npmOJJAd3jI IDloOUBgohGcEgLrggQFGq7EutjO+7yVECH07fHTeqFuv0vMAZQhmt65RxNeGWnCBCmu D2V/K43zU3Jm1hhek9oDBFiCbuOqkDwxD5073aTIQrr179irs597ZcfwhmcXcQ4nCuWY FHMFVcxKTYKElc5XJgz2aCrsYP6ku2U2ZyuoIXo/IEFsVw9vFrkjyJGk3TfVHuBqB47t zyQlpSt5PyLNXHNXyRQo8GNnabWvUkPXYQGZUz1TvmjtHNk0K/l+dYpr0tqHo/Ep7Xvv LHgw== X-Gm-Message-State: ALoCoQkXKSppHqrDgVBFFM6Nj1sQYlXWl5y66XnH3MsW+yF4Uf8knDvyCpUQGhaOxmS0S/KVE2r7 X-Received: by 10.140.21.134 with SMTP id 6mr35883945qgl.47.1433341795632; Wed, 03 Jun 2015 07:29:55 -0700 (PDT) Received: from [10.0.1.137] (c-73-189-247-124.hsd1.ca.comcast.net. [73.189.247.124]) by mx.google.com with ESMTPSA id z13sm445073qkg.44.2015.06.03.07.29.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jun 2015 07:29:54 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (12B466) In-Reply-To: Date: Wed, 3 Jun 2015 07:29:51 -0700 Cc: "bishop@php.net" , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <440717E2-B633-48FF-A629-DEC3E0D89B19@golemon.com> References: To: Michael Wallner Subject: Re: [PHP-DEV] Method call overhead From: php@golemon.com (Sara Golemon) > On Jun 3, 2015, at 00:50, Michael Wallner wrote: >=20 >>> On 03 06 2015, at 05:30, Bishop Bettini wrote: >>=20 >> My question though is on relative times. Method call overhead is >> consistently 50% to 150% over a direct call. Is my experiment invalid, o= r >> is this overhead expected? Is the overhead in the allocation, >> deallocation, GC? >=20 > I=E2=80=99suggest you use a tool like valgrind=E2=80=99s callgrind (and vi= sualize with e.g. kcachegrind). >=20 I'd also take variable function calling out of the picture (or at least, hav= e it as a separate dimension). Normal applications make pretty spare use of= variable functions (compared to actual direct calls), whereas your benchmar= k uses them exclusively. So you've explicitly chosen the most pessimistic p= ath, and an unrepresentative one. -Sara=