From: Yukihiro Matsumoto Date: 2008-06-23T17:20:03+09:00 Subject: [ruby-core:17380] Re: A faster Array#delete Hi, In message "Re: [ruby-core:17356] A faster Array#delete" on Sat, 21 Jun 2008 10:18:31 +0900, Daniel Berger writes: |I noticed that the Array#delete method in array.c is basically copying |the existing array element by element into a new array object. I |suspected it could be improved so I tried this. | |Using an approach similar to Array#delete_at, I came up with this: | |VALUE rb_ary_delete(VALUE self, VALUE v_object){ This patch gave me no significant performance improvement on my Linux box. Does any one confirm? Besides that, it doesn't work well (out of bound access) if the comparing method alters (e.g. shorten) the receiver. matz.