From: Carlos Date: 2004-07-03T08:01:16+09:00 Subject: Re: slow method searching? [David Garamond , 2004-07-02 23.56 CEST] > $ time ruby -e'a=(1..200000).to_a; a.classx' > -e:1: undefined method `classx' for # (NoMethodError) > > real 0m3.768s > user 0m1.640s > sys 0m0.010s > > $ time ruby -e'a=(1..200000).to_a; b=nil; b.classx' > -e:1: undefined method `classx' for nil:NilClass (NoMethodError) In my computer, there is a noticeable delay between the "-e:1" and the rest of the exception message. During that time, there is a lot of "mremap" system calls whose meaning I don't know (GC? OS swapping(?)? A very long longjmp(!?)?). Before I paste the last lines of the strace, which show the mremaps, I will write yet another paragraph (this), because if I'm going to waste internet bandwidth with non-answers, I'll do it good :). write(2, "-e:1", 4) = 4 brk(0) = 0x8158000 brk(0x8187000) = 0x8187000 mmap2(NULL, 270336, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402d1000 brk(0) = 0x8187000 brk(0) = 0x8187000 brk(0x816b000) = 0x816b000 brk(0) = 0x816b000 mremap(0x402d1000, 270336, 536576, MREMAP_MAYMOVE) = 0x402d1000 mremap(0x402d1000, 536576, 536576, MREMAP_MAYMOVE) = 0x402d1000 mremap(0x402d1000, 536576, 1069056, MREMAP_MAYMOVE) = 0x402d1000 mremap(0x402d1000, 1069056, 1069056, MREMAP_MAYMOVE) = 0x402d1000 mremap(0x402d1000, 1069056, 2134016, MREMAP_MAYMOVE) = 0x402d1000 write(2, ": ", 2) = 2 write(2, "undefined method lassx\' for #<"..., 49) = 49 write(2, " (", 2) = 2 write(2, "NoMethodError", 13) = 13 write(2, ")\n", 2) = 2 exit_group(1) = ? Good luck.