Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86471 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56576 invoked from network); 3 Jun 2015 03:30:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jun 2015 03:30:09 -0000 Authentication-Results: pb1.pair.com header.from=bishop.bettini@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bishop.bettini@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.52 as permitted sender) X-PHP-List-Original-Sender: bishop.bettini@gmail.com X-Host-Fingerprint: 209.85.215.52 mail-la0-f52.google.com Received: from [209.85.215.52] ([209.85.215.52:32785] helo=mail-la0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/A1-45124-0C47E655 for ; Tue, 02 Jun 2015 23:30:08 -0400 Received: by labpy14 with SMTP id py14so128224803lab.0 for ; Tue, 02 Jun 2015 20:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=IsDpQ/NhcIDxaVwKdHRJQF8H8ySQQuXzn7JiybK6TME=; b=lHjClouoNFQgjfk7wcKg55Vop6rbZrHA8A/lA0HTDGVd1XYVGHZqj9o3apHB+AWwuD p/QPOo0/qHUlWI9FWgMXTY6lVuhAe+JUNkDjsPg+u/X3/c+TvkzyReHfT9wA86WkA6zE o3VgzaaupQg+27/qLrcCDRAOqnWgWQoLxIa5nV64tj6Paf6dG7xOuKnRbrzmI3ceUXsL i1MF6VU/Ka7wT3JgFYtpMF6NYLOqjSaWsqvUd19U8e4BUEfmDdzJZ45Vb1KQD98bw12X msFegkuOu5L8pDw6AJ+GolZpZg4Uh2BOOnKMKkdOa2GvrSmzlhR7LMiLZFuTHC6GwurR coTQ== MIME-Version: 1.0 X-Received: by 10.112.219.70 with SMTP id pm6mr29035914lbc.41.1433302205298; Tue, 02 Jun 2015 20:30:05 -0700 (PDT) Reply-To: bishop@php.net Sender: bishop.bettini@gmail.com Received: by 10.152.6.197 with HTTP; Tue, 2 Jun 2015 20:30:05 -0700 (PDT) Date: Tue, 2 Jun 2015 23:30:05 -0400 X-Google-Sender-Auth: 4ElzPPiumPuAgfezMDPgpyLuUBs Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a11c3ccd8cd7ecc051794ac5d Subject: Method call overhead From: bishop@php.net (Bishop Bettini) --001a11c3ccd8cd7ecc051794ac5d Content-Type: text/plain; charset=UTF-8 Hi! I've measured the overhead for method calls in a variety of environments (Amazon, Travis, and 3v4l). The results are reliable and here's 3v4l . Some observations. First, as expected, direct calls are faster than static object calls, which are faster than object calls. Second, in absolute times PHP7 outperforms HHVM3 substantially. Kudos, really impressive. My question though is on relative times. Method call overhead is consistently 50% to 150% over a direct call. Is my experiment invalid, or is this overhead expected? Is the overhead in the allocation, deallocation, GC? Cheers, bishop --001a11c3ccd8cd7ecc051794ac5d--