On 03/21/2017 02:14 AM, Elizabeth Mattijsen wrote:
On 21 Mar 2017, at 10:00, ToddAndMargo <toddandma...@zoho.com> wrote:
on this command:
perl6 -e 'my @foo = <a b c d e f g>; @foo.splice(0,3); say @foo;'
Are you actually moving one set up data into another set's
element/slot/index, or are you just rearranging the pointers
to each element?
How is that important?
If you want to know what is faster: 3x shift or 1x splice, benchmark! :-)
Liz
Hi Liz,
I do not know if it is important at all.
I am going to start coding on a first in, last out
log file. It will probably be in excess to 1000
lines. I will be reading the log file into an array.
When I hit 1000 elements (strings) in the array, I
want to start removing things from the beginning of
the array as I start adding things to the end of
the array.
I don't want to be moving 999 strings from one
element to the prior element.
This is why I wanted to know what you were actually
doing at the code level. It would be sweet if all
you are doing is changing the pointer, not moving
the data.
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~