From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19431 invoked by alias); 14 Oct 2015 16:50:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36859 Received: (qmail 26703 invoked from network); 14 Oct 2015 16:50:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=UsWDRS2RLc2XRNjegtXqs6oYTcCMM2JqQwuDa1LXAeA=; b=m6nL2/Cka9EcLpuIJurseviCtLKjXWCYohz42aSXHHNjyFR4QN1i8Zt78udN24Gja+ 2gGYkMMPycYKTVrCxqJ2bAyQUygm5Hdl4QFpQiFv+XSSJnlsxu1+XesgUCaWsv8GbrEY AExvtkEcRFqibMR0y/NV2JY9PUdWlkvAhrINzM8jwAmynghrmDSPWMdOEkWGPObhgAcb lrd3lMr/kCcgHG8PTzbrfbklIUdsITBKhXEEej7kLwJyDV7SBrUJaO7BDX9uXE0msVd0 TTNvWS5mEtkyqkZ1PdKPcNIXbJe13fQw87H1KuihMhTn1+0DL2FQv57vvdC5UgyRGMdV PRow== X-Gm-Message-State: ALoCoQkP3BawcjblqtspdczApHHyBRc30msJP46TL7LXhSgVboSXBrN7Cgjh0fiz45me0ciV2RDj X-Received: by 10.182.91.80 with SMTP id cc16mr2657932obb.19.1444841412799; Wed, 14 Oct 2015 09:50:12 -0700 (PDT) From: Bart Schaefer Message-Id: <151014095009.ZM19954@torch.brasslantern.com> Date: Wed, 14 Oct 2015 09:50:09 -0700 In-Reply-To: <151014092536.ZM32511@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Slowdown around 5.0.5-dev-0" (Oct 14, 9:25am) References: <151010105849.ZM10144@torch.brasslantern.com> <151010170623.ZM16166@torch.brasslantern.com> <151010232045.ZM12931@torch.brasslantern.com> <151011091757.ZM27755@torch.brasslantern.com> <151011103121.ZM8814@torch.brasslantern.com> <151011142204.ZM9103@torch.brasslantern.com> <151012070105.ZM15099@torch.brasslantern.com> <151012173304.ZM15477@torch.brasslantern.com> <151013085246.ZM30504@torch.brasslantern.com> <20151014142722.282d0c5a@pwslap01u.europe.root.pri> <151014092536.ZM32511@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Slowdown around 5.0.5-dev-0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 14, 9:25am, Bart Schaefer wrote: } } NEWHEAPS() is O(1) where pushheap() is O(N) where N is the number of } arenas [...] the question is would it slow down in the more normal use } case of a mostly-empty heap and a lot of function calls Just as a data point, I tried swapping out the push/pop pair in the source() function with NEWHEAPS/OLDHEAPS and "time"-ing a full run of "make check" each way. NEWHEAPS was slightly slower and had higher CPU use -- but the test scripts aren't a typical shell use pattern.