[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map ca
From: |
Mark H Weaver |
Subject: |
Re: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow) |
Date: |
Thu, 28 Mar 2013 01:05:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Nala Ginrut <address@hidden> writes:
> But I'm still puzzled with the performance of par-map:
> --------------------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-------------------
>
> So my question is, what's the proper scenario to use par-map?
It only makes sense to use 'par-map' when the procedure is fairly
expensive to compute. There is inevitably a lot of overhead in creating
and joining the threads. Granted, we should be able to do much better
than we're doing now, but it would *never* make sense to use 'par-map'
when each computation is as simple as (expt x 5).
Regards,
Mark
- Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow), Nala Ginrut, 2013/03/27
- Re: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow),
Mark H Weaver <=
- Re: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow), Nala Ginrut, 2013/03/28
- Re: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow), Mark H Weaver, 2013/03/29
- Extremely high overhead of 'par-map', Mark H Weaver, 2013/03/29
- Re: Extremely high overhead of 'par-map', Noah Lavine, 2013/03/29
- Re: Extremely high overhead of 'par-map', Noah Lavine, 2013/03/29
- Re: Extremely high overhead of 'par-map', Mark H Weaver, 2013/03/29
- Re: Extremely high overhead of 'par-map', Ludovic Courtès, 2013/03/30