[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: |
Fri, 29 Mar 2013 12:45:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
I wrote:
> Nala Ginrut <address@hidden> 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).
BTW, I notice that the overhead of 'par-map' is much less for shorter
lists. It's about 9 times faster for lists of length 1000, and about 20
times faster for lists of length 100.
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,time (define a (par-map (lambda (x) (expt x 5)) (iota
10000)))
;; 8.293139s real time, 8.281802s run time. 1.310634s spent in GC.
scheme@(guile-user)> ,time (define a (for-each (lambda (k) (par-map (lambda (x)
(expt x 5)) (iota 1000))) (iota 10)))
;; 0.908630s real time, 0.916819s run time. 0.070018s spent in GC.
scheme@(guile-user)> ,time (define a (for-each (lambda (k) (par-map (lambda (x)
(expt x 5)) (iota 100))) (iota 100)))
;; 0.330130s real time, 0.418148s run time. 0.045255s spent in GC.
--8<---------------cut here---------------end--------------->8---
Mark
- Re: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow), (continued)
- 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
- 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), Ludovic Courtès, 2013/03/29