ruby speedup ideas

a couple of “run time parsing and rewriting” ideas for ruby:

1) inline methods.  Not too hard, right? :)

2) if you’ve got

def go(a)

 if a.is_a? Array

   # stuff

 else

   # other stuff

 end

end

then you “could” wrap go, determine its inputs, then rewrite it as

def go_a_as_array(a)

  stuff

end

and call it appropriately.

One thought on “ruby speedup ideas

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>