bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-29 Thread Ludovic Courtès
Nala Ginrut skribis: > And there're two possible applications: > 1. handle the requests in a server > 2. read files from disk (but how big file is proper for par-map) Quoting the fine manual: Note that futures are intended for the evaluation of purely functional expressions. Expressions th

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-28 Thread Nala Ginrut
On Thu, 2013-03-28 at 01:05 -0400, Mark H Weaver wrote: > Nala Ginrut 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 > > 1))) > > ;; 0.008019s real

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-28 Thread Ludovic Courtès
Mark H Weaver skribis: > l...@gnu.org (Ludovic Courtès) writes: > >> Mark H Weaver skribis: >> >>> It only makes sense to use 'par-map' when the procedure is fairly >>> expensive to compute. >> >> Indeed. >> >>> There is inevitably a lot of overhead in creating and joining the >>> threads. >> >>

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-28 Thread Mark H Weaver
Hi Ludovic, l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> It only makes sense to use 'par-map' when the procedure is fairly >> expensive to compute. > > Indeed. > >> There is inevitably a lot of overhead in creating and joining the >> threads. > > We use a thread pool, so

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-28 Thread Ludovic Courtès
Mark H Weaver skribis: > Nala Ginrut 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 >> 1))) >> ;; 0.008019s real time, 0.007979s run time. 0.00s

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-27 Thread Mark H Weaver
Nala Ginrut 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 > 1))) > ;; 0.008019s real time, 0.007979s run time. 0.00s spent in GC. > scheme@(guile-user

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-27 Thread Nala Ginrut
On Wed, 2013-03-27 at 18:12 +0100, Ludovic Courtès wrote: > Hi, > > Nala Ginrut skribis: > > > scheme@(guile-user)> (par-map 1+ (iota 1)) > > While executing meta-command: > > ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack > > overflow" ())'. > > Commit 8a177d3 fixes this. I

bug#13188: par-map causes VM stack overflow

2013-03-27 Thread Ludovic Courtès
Hi, Nala Ginrut skribis: > scheme@(guile-user)> (par-map 1+ (iota 1)) > While executing meta-command: > ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack > overflow" ())'. Commit 8a177d3 fixes this. I added a paragraph in the documentation that explains what happens: delimited c

bug#13188: par-map causes VM stack overflow

2012-12-15 Thread Nala Ginrut
Here is the error message. Anyway, par-map shouldn't cause stack overflow. ---err msg-- scheme@(guile-user)> (par-map 1+ (iota 1)) While executing meta-command: ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'.