Re: [racket-dev] gc vs assignment

2010-08-24 Thread Matthias Felleisen
And what if they don't live in the nursery? On Aug 24, 2010, at 10:51 AM, Kevin Tew wrote: Write barriers in racket3m are implemented using memory protection primitives provided by the OS. Between collections we only incur a write barrier cost the first time a page (16k in racket) is

Re: [racket-dev] gc vs assignment

2010-08-24 Thread Will M. Farr
On Aug 24, 2010, at 10:46 AM, Matthias Felleisen wrote: (I don't quite understand why there's no extra cost for the second access, but I'll think about it and figure it out.) If I understand things correctly, the short answer is fancy hardware. The page is marked as read-only in the MMU, so

Re: [racket-dev] gc vs assignment

2010-08-24 Thread Sam Tobin-Hochstadt
On Tue, Aug 24, 2010 at 11:43 AM, Kevin Tew t...@cs.utah.edu wrote: After a garbage collection all non-nursery memory is write-protected. The first write to a page (16kB) , after a garbage collection, incurs the cost of unprotecting the page so it is writable and recording that the page has

Re: [racket-dev] hashes in ASL

2010-08-24 Thread Jay McCarthy
What documentation are you looking at? http://docs.racket-lang.org/htdp-langs/advanced-prim-ops.html#(part._(lib._htdp-advanced..ss._lang)._.Hash_.Tables) As far as the immutable functions, when I sent you the list of the functions I intended to add, those were not on it. They were intentionally

Re: [racket-dev] gc vs assignment

2010-08-24 Thread Kevin Tew
On 08/24/2010 11:38 AM, Jay McCarthy wrote: On Tue, Aug 24, 2010 at 10:53 AM, Joe Marshalljmarsh...@alum.mit.edu wrote: I'm surprised that racket3m uses page protection. Taking a hardware trap can often be thousands of times slower than taking an inline conditional branch. My

Re: [racket-dev] gc vs assignment

2010-08-24 Thread Matthias Felleisen
So at this point, we don't really know what the relative costs are. -- Matthias _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [racket] Long compilation+launch times

2010-08-24 Thread Robby Findler
Oh yeah, that's what I figured (and why there was such a long delay before my change), but I thought I'd reply here since that's where this came up most recently. Robby On Tue, Aug 24, 2010 at 9:56 AM, Laurent laurent.ors...@gmail.com wrote: On Tue, Aug 24, 2010 at 16:46, Robby Findler

Re: [racket-dev] gc vs assignment

2010-08-24 Thread Matthew Flatt
Here's a program that tries to expose various costs. On my machine, the output is: 'cons-of-cXr+barrier-set! cpu time: 13137 real time: 13206 gc time: 552 'cons-of-cXr+free-set! cpu time: 12832 real time: 12995 gc time: 541 'cons-of-cXr cpu time: 10023 real time: 10103 gc time: 526

Re: [racket-dev] gc vs assignment

2010-08-24 Thread Matthias Felleisen
On Aug 24, 2010, at 7:13 PM, Matthew Flatt wrote: When the GC is well-tuned, it's difficult to slow a program down by using mutation --- especially relative to all the other ways you can slow a program down. This is good enough for me to correct my old belief about mutation and GCing.

Re: [racket-dev] require sub-forms

2010-08-24 Thread Jay McCarthy
There is not now but we could make a module that only exported them so you could provide all-from-out it and thus centralize the list of subforms. That's the cleanest idea I have. (You don't want to hear my really bad ideas) Jay Sent from my iPhone On Aug 24, 2010, at 8:46 PM, Shriram