G
Guest
Hi all=2E
I have the method like:
class MyCoolClass
def initialize
@var =3D []
end
#some other methods push values to @var
#here is method of interest:
def [](idx); @var[idx] end
end
I have those, a bit confusing, profiling results:
Total Self Children Calls Name
0=2E09 0=2E05 0=2E04 66565 MyCoolClass#[]
0=2E04 0=2E04 0=2E00 66565 Array#[]
The strange thing is: method MyCoolClass#[] spends so much time inside its=
elf, though ALL it do - only call Array#[]=2E
Is this normal? Maybe, because of so huge calls count, but I can't underst=
and this
Thanks=2E
V=2E
I have the method like:
class MyCoolClass
def initialize
@var =3D []
end
#some other methods push values to @var
#here is method of interest:
def [](idx); @var[idx] end
end
I have those, a bit confusing, profiling results:
Total Self Children Calls Name
0=2E09 0=2E05 0=2E04 66565 MyCoolClass#[]
0=2E04 0=2E04 0=2E00 66565 Array#[]
The strange thing is: method MyCoolClass#[] spends so much time inside its=
elf, though ALL it do - only call Array#[]=2E
Is this normal? Maybe, because of so huge calls count, but I can't underst=
and this
Thanks=2E
V=2E