From: Eric Wong Date: 2018-08-20T19:00:09+00:00 Subject: [ruby-core:88575] Re: [Ruby trunk Feature#15010] Reduce allocation for rest parameters chopraanmol1@gmail.com wrote: > normalperson (Eric Wong) wrote: > > Cool! It's probably worth implementing something like > > rb_ary_shift_m (but without the return value) to avoid looping > > on rb_ary_shift. > Added rb_ary_clear_m (suggestion for a better name will be > appreciated) with suggested changes. Thanks; for internal functions the name isn't as important :) New functions prototypes should go into internal.h, though. ruby/intern.h ended up being part of the public API and external libraries depend on it :< There's no reason for arg_rest_dup to be a macro instead of a static inline function. Static inlines are preferred because they make life easier for the compiler and debugger. Also, multi-line macros without "do {} while (0)" is dangerous to control flow. Thanks again. Unsubscribe: