Skip to content

Instantly share code, notes, and snippets.

@jamez01
Created June 6, 2014 17:30
Show Gist options
  • Save jamez01/a522736742ad0d8a91cd to your computer and use it in GitHub Desktop.
Save jamez01/a522736742ad0d8a91cd to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
@willluongo
Copy link

You could improve performance quite a bit by not invoking the ruby interpreter:

will@titan ruby-2.1.1
~ ∴time ./test.rb

real    0m0.001s
user    0m0.000s
sys 0m0.001s
will@titan ruby-2.1.1

will@titan ruby-2.1.1
~ ∴time ./test2.rb

real    0m0.051s
user    0m0.039s
sys 0m0.010s
will@titan ruby-2.1.1
~ ∴cat test.rb
will@titan ruby-2.1.1
~ ∴cat test2.rb
#!/usr/bin/env ruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment