Re: subs and variables speed question

2019-02-11 Thread Timo Paulssen
> On 2/11/19 3:27 AM, Timo Paulssen wrote: > > WHICH doesn't give you a numerical value. just print it as it is. > > > $ p6 'sub a (Buf $b) { say $b.WHICH }; my $c = Buf.new(1,2,3); say > $c.WHICH; a($c);' > Buf|71848984 > Buf|71848984 > > If "moarvm has a moving garbage collector" moves my 100

Re: subs and variables speed question

2019-02-11 Thread ToddAndMargo via perl6-users
On 11/02/2019 07:12, ToddAndMargo via perl6-users wrote: WHERE is pretty sweet command! $ p6 'sub a (Buf $b) { say $b.WHERE.base(0x10) }; my $c = Buf.new(1,2,3); say $c.WHERE.base(0x10); a($c);' 7F385D41334C 7F385D41334C On 11/02/2019 12:16, ToddAndMargo via perl6-users wrote: On 2/11/19

Re: subs and variables speed question

2019-02-11 Thread Timo Paulssen
WHICH doesn't give you a numerical value. just print it as it is. On 11/02/2019 12:16, ToddAndMargo via perl6-users wrote: > On 2/11/19 2:52 AM, Timo Paulssen wrote: >> Please be aware that WHERE will give you the actual memory address of an >> object, but moarvm has a moving garbage collector,

Re: subs and variables speed question

2019-02-11 Thread ToddAndMargo via perl6-users
On 2/11/19 2:52 AM, Timo Paulssen wrote: Please be aware that WHERE will give you the actual memory address of an object, but moarvm has a moving garbage collector, which means that objects can change their memory location. at the moment it will only happen up to two times, i believe. you'll

Re: subs and variables speed question

2019-02-11 Thread Timo Paulssen
Please be aware that WHERE will give you the actual memory address of an object, but moarvm has a moving garbage collector, which means that objects can change their memory location. at the moment it will only happen up to two times, i believe. you'll probably have a better result with .WHICH for

Re: subs and variables speed question

2019-02-10 Thread ToddAndMargo via perl6-users
On 2/9/19 2:28 PM, ToddAndMargo via perl6-users wrote: On 2/9/19 1:56 PM, ToddAndMargo via perl6-users wrote: Hi All, sub xxx( Buf $YugeBuf is ro ) {some midricle} Is $YugeBuf (up to 100 MB) a copy of just the structure? I don't want the time time of a copy. Many thanks, -T Without all

Re: subs and variables speed question

2019-02-10 Thread ToddAndMargo via perl6-users
On 2/9/19 2:28 PM, ToddAndMargo via perl6-users wrote: On 2/9/19 1:56 PM, ToddAndMargo via perl6-users wrote: Hi All, sub xxx( Buf $YugeBuf is ro ) {some midricle} Is $YugeBuf (up to 100 MB) a copy of just the structure? I don't want the time time of a copy. Many thanks, -T Without all

Re: subs and variables speed question

2019-02-10 Thread ToddAndMargo via perl6-users
WHERE is pretty sweet command! $ p6 'sub a (Buf $b) { say $b.WHERE.base(0x10) }; my $c = Buf.new(1,2,3); say $c.WHERE.base(0x10); a($c);' 7F385D41334C 7F385D41334C

Re: subs and variables speed question

2019-02-09 Thread ToddAndMargo via perl6-users
On 2/9/19 1:56 PM, ToddAndMargo via perl6-users wrote: Hi All, sub xxx( Buf $YugeBuf is ro ) {some midricle} Is $YugeBuf (up to 100 MB) a copy of just the structure? I don't want the time time of a copy. Many thanks, -T Without all the typos: Hi All, sub xxx( Buf $YugeBuf is ro ) {some