Re: [racket] Saving memory by sharing a racket VM instance?

2014-03-29 Thread Greg Hendershott
>> I think, something like (thread (load "path/to/program.rkt")) > This doesn't work unless program.rkt is written in #lang racket/load > which is unsuitable for large applications. Perhaps use racket/sandbox? http://docs.racket-lang.org/reference/Sandboxed_Evaluation.html `make-module-evalutor

Re: [racket] drracket -singleInstance

2014-03-29 Thread Matthew Flatt
At Thu, 27 Mar 2014 07:45:23 -0300, David Bremner wrote: > Aha, that was indeed part of the problem, thanks. Now it works for > absolute paths. For relative paths it gets hung up part way; I've pushed a repair for relative paths. Thanks for the report! Racket Users list:

Re: [racket] Tail recursive module cons

2014-03-29 Thread Patrick Useldinger
On 29/03/2014 03:54, Yuhao Dong wrote: Using accumulator+reverse won't really improve the runtime at all. Every other benchmark has (unfortunately) shown the opposite. I think that tail recursion doesn't help at all, and introduces conceptual overhead. Racket doesn't use the stack, and conver

Re: [racket] Tail recursive module cons

2014-03-29 Thread Matthias Felleisen
On Mar 29, 2014, at 8:45 AM, Yuhao Dong wrote: > I think my point still holds that tail recursion in the case I posted > does not improve performance The purpose of transforming a program into tail-call shape is to save space. It does NOT necessarily improve performance. [[ I do not understa

Re: [racket] Saving memory by sharing a racket VM instance?

2014-03-29 Thread Yuhao Dong
This doesn't work unless program.rkt is written in #lang racket/load which is unsuitable for large applications. On Sat, 2014-03-29 at 15:17 +0400, Roman Klochkov wrote: > I think, something like (thread (load "path/to/program.rkt")) > > > Fri, 28 Mar 2014 19:12:03 -0400 от Yuhao Dong : >

Re: [racket] Tail recursive module cons

2014-03-29 Thread Yuhao Dong
Thanks. I probably mixed it up also with the implementation of the compiler targeting C of Chicken Scheme, which basically just converts everything to continuation-passing style. I think my point still holds that tail recursion in the case I posted does not improve performance. At least the timing

Re: [racket] Tail recursive module cons

2014-03-29 Thread Prabhakar Ragde
Yuhao Dong wrote: The thing is, Racket's "stack" is a list of continuations. I don't see how explicitly keeping the "stack" in an accumulator would help. Stack overflow won't be a problem since the "stack" is a list on the heap, and unless memory runs out you wont overflow. I think that tail

Re: [racket] Tail recursive module cons

2014-03-29 Thread Laurent
Some comments: 1) Never run benchmarks inside DrRacket (I suspect this is what you did because the reported times are high) 2) Why do you include the garbage collections in the time measurment? That's probably not what you want to measure (plus the gc should before the calls) 3) The need to call `r

Re: [racket] Saving memory by sharing a racket VM instance?

2014-03-29 Thread Roman Klochkov
I think, something like (thread (load "path/to/program.rkt")) Fri, 28 Mar 2014 19:12:03 -0400 от Yuhao Dong : >So, I have a really, really cheap VPS. I need to run several racket >programs on it; however, just the memory usage of the standard library, >jit, etc of each racket instance means that