Re: Possible quick win in GC?

2014-09-30 Thread Abdulhaq via Digitalmars-d
On Monday, 29 September 2014 at 12:02:40 UTC, thedeemon wrote: On Monday, 29 September 2014 at 11:36:51 UTC, Abdulhaq wrote: So, (does anyone know) has this technique been discarded for D or is it 'just' a matter of the resources to do it? From the literature on this topic I remember

Re: Possible quick win in GC?

2014-09-29 Thread Abdulhaq via Digitalmars-d
You mean this? https://en.wikipedia.org/wiki/Escape_analysis Of course my proposal uses the techique of escape analysis as part of its methodology, but the essence of the idea is to greatly cut down on the work that the GC has to do on each sweep when dealing with objects that have been

Re: Possible quick win in GC?

2014-09-29 Thread Abdulhaq via Digitalmars-d
On Sunday, 28 September 2014 at 20:20:29 UTC, David Nadlinger wrote: On Sunday, 28 September 2014 at 16:29:45 UTC, Abdulhaq wrote: I got the idea after thinking that it should be fairly simple for the compiler to detect straightforward cases of when a variable can be declared as going on the

Re: Possible quick win in GC?

2014-09-29 Thread Mike via Digitalmars-d
On Monday, 29 September 2014 at 07:03:29 UTC, Abdulhaq wrote: On Sunday, 28 September 2014 at 20:20:29 UTC, David Nadlinger wrote: On Sunday, 28 September 2014 at 16:29:45 UTC, Abdulhaq wrote: I got the idea after thinking that it should be fairly simple for the compiler to detect

Re: Possible quick win in GC?

2014-09-29 Thread thedeemon via Digitalmars-d
On Sunday, 28 September 2014 at 16:29:45 UTC, Abdulhaq wrote... Congratulations on inventing http://en.wikipedia.org/wiki/Region-based_memory_management and Region inference in particular.

Re: Possible quick win in GC?

2014-09-29 Thread Abdulhaq via Digitalmars-d
On Monday, 29 September 2014 at 11:02:12 UTC, thedeemon wrote: On Sunday, 28 September 2014 at 16:29:45 UTC, Abdulhaq wrote... Congratulations on inventing http://en.wikipedia.org/wiki/Region-based_memory_management and Region inference in particular. Ah yes - it's identical isn't it - I

Re: Possible quick win in GC?

2014-09-29 Thread Abdulhaq via Digitalmars-d
On Monday, 29 September 2014 at 09:45:38 UTC, Mike wrote: On Monday, 29 September 2014 at 07:03:29 UTC, Abdulhaq wrote: On Sunday, 28 September 2014 at 20:20:29 UTC, David Nadlinger wrote: On Sunday, 28 September 2014 at 16:29:45 UTC, Abdulhaq wrote: I got the idea after thinking that it

Re: Possible quick win in GC?

2014-09-29 Thread thedeemon via Digitalmars-d
On Monday, 29 September 2014 at 11:36:51 UTC, Abdulhaq wrote: So, (does anyone know) has this technique been discarded for D or is it 'just' a matter of the resources to do it? From the literature on this topic I remember attempts for automatic region inference mostly failed: it lead to some

Possible quick win in GC?

2014-09-28 Thread Abdulhaq via Digitalmars-d
Perhaps I've too had much caffeine today but I've had an idea which might give a fairly quick win on the GC speed situation. It's a simple idea at heart so it's very possible/likely that this is a well known idea that has already been discarded but anyway here goes. I got the idea after

Re: Possible quick win in GC?

2014-09-28 Thread Abdulhaq via Digitalmars-d
Here's a code snippet which mopefully makes things a bit clearer: /** * In this example the variable foo can be statically analysed as safe to go on the stack. * The new instance of Bar allocated in funcLevelB is only referred to by foo. foo can * be considered a root 'scoped' variable and

Re: Possible quick win in GC?

2014-09-28 Thread Freddy via Digitalmars-d
On Sunday, 28 September 2014 at 17:47:42 UTC, Abdulhaq wrote: Here's a code snippet which mopefully makes things a bit clearer: /** * In this example the variable foo can be statically analysed as safe to go on the stack. * The new instance of Bar allocated in funcLevelB is only referred to

Re: Possible quick win in GC?

2014-09-28 Thread David Nadlinger via Digitalmars-d
On Sunday, 28 September 2014 at 16:29:45 UTC, Abdulhaq wrote: I got the idea after thinking that it should be fairly simple for the compiler to detect straightforward cases of when a variable can be declared as going on the stack - i.e. no references to it are retained after its enclosing