4 ms·
Except for loading the Ruby VM. Takes way too long.
by pikachu_is_cool 10y ago
Except for loading the Ruby VM. Takes way too long.
- mikemcquaid 10y agoWhich is why for certain things like `brew --prefix` we now do it purely in Bash rather than using Ruby ;)
- barpet 10y agoWhy would bash be faster ? Would not you essentially call the same C lib stuff anyway ?
- s_kilk 10y agoIt would at least save the process-start overhead, plus loading the ruby vm and modules/gems.
- mikemcquaid 10y agoExactly. For a simple string comparison Bash is far faster (although Homebrew doesn't use require any gems, just FYI).
- s_kilk 10y agoGood to know, so did the speedup come mostly from not spinning-up the Ruby VM?
- mikemcquaid 10y agoYep!
- deleted 10y ago[deleted]
- pikachu_is_cool 10y agoI guess it's a start. But even still, the most basic of commands take a good 1+ seconds on my machine. What about Ruby makes it necessary to use? What is stopping you guys from moving to something like LuaJIT?
- mikemcquaid 10y agoRewriting the entire project in non-Ruby would require a lot of time and create a lot of bugs for little benefit for most users.
- pikachu_is_cool 10y agoUnfortunate.