* array.c (rb_ary_shift): shift/unshift performance boost patch,

based on the patch from Eric Mahurin <eric_mahurin at yahoo.com>.
  [ruby-core:05861]

* array.c (rb_ary_unshift_m): ditto.

* array.c (ary_make_shared): ditto.

* array.c (RESIZE_CAPA): ditto.

* array.c (rb_ary_free): new function to free memory.  code moved
  from gc.c.

* string.c (rb_str_free): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-09-26 22:46:16 +00:00
parent 4f6f0b1066
commit 1113d54ede
5 changed files with 124 additions and 48 deletions

View file

@ -37,10 +37,7 @@ VALUE rb_ary_new(void);
VALUE rb_ary_new2(long);
VALUE rb_ary_new3(long,...);
VALUE rb_ary_new4(long, const VALUE *);
VALUE rb_values_new(long,...);
VALUE rb_values_new2(long, const VALUE *);
VALUE rb_values_from_ary(VALUE);
VALUE rb_ary_from_values(VALUE);
void rb_ary_free(VALUE);
VALUE rb_ary_freeze(VALUE);
VALUE rb_ary_aref(int, VALUE*, VALUE);
void rb_ary_store(VALUE, long, VALUE);
@ -488,6 +485,7 @@ VALUE rb_tainted_str_new(const char*, long);
VALUE rb_tainted_str_new2(const char*);
VALUE rb_str_buf_new(long);
VALUE rb_str_buf_new2(const char*);
void rb_str_free(VALUE);
VALUE rb_str_buf_append(VALUE, VALUE);
VALUE rb_str_buf_cat(VALUE, const char*, long);
VALUE rb_str_buf_cat2(VALUE, const char*);