From: ts Date: 2000-11-02T23:53:44+09:00 Subject: [ruby-talk:5993] Re: Mem overhead of singleton (ProgRuby chapt 19 q) >>>>> "R" == Robert Feldt writes: R> Basically this boils down to how many bytes are needed for a R> (small) singleton method like the one above? You can probably have amore precise value, but just to give you an example here the nodes needed for a small method pigeon% cat b.rb #! /usr/bin/ruby -rii def method(*args, &block) old_method end dump Object, :method pigeon% pigeon% b.rb Method Object::method SCOPE BLOCK ARGS (*args) BLOCK_ARG (&block) NEWLINE <./b.rb:3> VCALL old_method pigeon% You just need to look at each node and make the sum of all bytes used :-) p.s.: there is a big reason for attribute accessor because ruby, in this case, use *only* one (1) node Guy Decoux