From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: Extremely high overhead of 'par-map' Date: Fri, 29 Mar 2013 16:24:54 -0400 Message-ID: References: <1355559152.27310.5.camel@Renee-desktop.suse> <87y5d8rclr.fsf@gnu.org> <1364439334.2730.41.camel@Renee-desktop.suse> <874nfwazc3.fsf@tines.lan> <1364524610.2730.48.camel@Renee-desktop.suse> <87d2uiah6h.fsf@tines.lan> <878v56agp1.fsf_-_@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d042f9f6695151a04d91611e9 X-Trace: ger.gmane.org 1364588722 25447 80.91.229.3 (29 Mar 2013 20:25:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Mar 2013 20:25:22 +0000 (UTC) Cc: guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Mar 29 21:25:49 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ULfrv-0004Sb-UM for guile-devel@m.gmane.org; Fri, 29 Mar 2013 21:25:48 +0100 Original-Received: from localhost ([::1]:46751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULfrX-0001iw-KX for guile-devel@m.gmane.org; Fri, 29 Mar 2013 16:25:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULfrS-0001iq-R0 for guile-devel@gnu.org; Fri, 29 Mar 2013 16:25:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULfrP-0003pD-Sz for guile-devel@gnu.org; Fri, 29 Mar 2013 16:25:18 -0400 Original-Received: from mail-da0-x22f.google.com ([2607:f8b0:400e:c00::22f]:42499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULfrP-0003od-NC for guile-devel@gnu.org; Fri, 29 Mar 2013 16:25:15 -0400 Original-Received: by mail-da0-f47.google.com with SMTP id s35so330562dak.6 for ; Fri, 29 Mar 2013 13:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=FU9Px5E0Gsjvj6vQFsGgAkTejcsF3RUqSqCwW4Zm9qw=; b=uBzlPediGtDTrtEK8fMg/d55vGl5AvM+k3x8fCsYxmcqZr2B/C2V92yYRmfWyYWlne a9oSj/YUVi+Qkup/LXgJsNq7+2hJ/BhIwcYlaPvoWoba8vfbE9+LZXId9n2/XTARicga TuhUv+j+JS+x4cjvlMnpaWUaeOWu4ChOCkoJ3Etm3dPecxtH2KmFTvR1/VEZv9iKWwut Ci/F1SE6eEJS2E4RVGr6mdRbTLWsma1VIAEXpw118n2WAOOuLmtWGakCOOM315VMhp55 onkM3EyEIQg/A0dJUdqnqHExoi8k1tywt8AdPO34za8jDDxV+JH7quCnxgsUS//L3Z2J DmDg== X-Received: by 10.66.72.3 with SMTP id z3mr6262704pau.125.1364588714331; Fri, 29 Mar 2013 13:25:14 -0700 (PDT) Original-Received: by 10.68.157.42 with HTTP; Fri, 29 Mar 2013 13:24:54 -0700 (PDT) In-Reply-To: <878v56agp1.fsf_-_@tines.lan> X-Google-Sender-Auth: 2eBJVa3Wh0fyrsCVpArlcwf9Ce4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::22f X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16057 Archived-At: --f46d042f9f6695151a04d91611e9 Content-Type: text/plain; charset=ISO-8859-1 I agree. Do you have any idea what's causing the overhead? I tried to benchmark it, but got a segmentation fault. I think we have plenty of work to do here. :-) Noah On Fri, Mar 29, 2013 at 2:00 AM, Mark H Weaver wrote: > I wrote: > > > Nala Ginrut writes: > >> --------------------cut------------------- > >> scheme@(guile-user)> ,time (define a (map (lambda (x) (expt x 5)) (iota > >> 10000))) > >> ;; 0.008019s real time, 0.007979s run time. 0.000000s spent in GC. > >> scheme@(guile-user)> ,time (define a (par-map (lambda (x) (expt x 5)) > >> (iota 10000))) > >> ;; 6.596471s real time, 6.579375s run time. 1.513880s spent in GC. > >> --------------------end------------------- > > [...] > >> Well, is there any example? > > > > The timings above suggest that, on your machine, the overhead of > > 'par-map' is in the neighborhood of 660 microseconds per thread (that's > > the total run time divided by 10000 iterations). > > I must say that 'par-map' has shockingly poor performance. > We really ought to try to improve this. > > Mark > > --f46d042f9f6695151a04d91611e9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I agree. Do you have any idea what's causing the = overhead?

I tried to benchmark it, but got a segmentation faul= t. I think we have plenty of work to do here. :-)

Noah


On Fri, Mar 29, 2013 at 2:00 AM, Mark H = Weaver <mhw@netris.org> wrote:
nalaginrut@gma= il.com> writes:
>> --------------------cut-------------------
>> scheme@(guile-user)> ,time (define a (map (lambda (x) (expt x 5= )) (iota
>> 10000)))
>> ;; 0.008019s real time, 0.007979s run time. =A00.000000s spent in = GC.
>> scheme@(guile-user)> ,time (define a (par-map (lambda (x) (expt= x 5))
>> (iota 10000)))
>> ;; 6.596471s real time, 6.579375s run time. =A01.513880s spent in = GC.
>> --------------------end-------------------
> [...]
>> Well, is there any example?
>
> The timings above suggest that, on your machine, the overhead of
> 'par-map' is in the neighborhood of 660 microseconds per threa= d (that's
> the total run time divided by 10000 iterations).

I must say that 'par-map' has shockingly poor performance.
We really ought to try to improve this.

=A0 =A0 =A0Mark


--f46d042f9f6695151a04d91611e9--