6 ms·
I recommend whatching "Ruby3: What's Missing?", a presentation Matz gave earlier this month: https://www.youtube.com/watch?v=cmOt9HhszCI https://www.youtube.com
by phaedryx 7y ago
I recommend whatching "Ruby3: What's Missing?", a presentation Matz gave earlier this month:
https://www.youtube.com/watch?v=cmOt9HhszCI https://www.youtube.com/watch?v=cmOt9HhszCI
This might be misleading. That is, jump to around the 29 minute mark where he talks about the type profiler and .rbi file stuff.
- aasasd 7y agoAs a user of Homebrew, I just wonder if Ruby's ever going to have performance.
- theredbox 7y agoYes and no. You need to basically fork the compiler and invent a new type of ruby that sacrifices certain things in favor of performance.
- bjoli 7y agoIt is no worse than python, but with the 3x3 initiative the main implementation will be a lot faster than today, which will never happen to python unless the current lead will go 180 degrees against what Guido always claimed.
- aasasd 7y ago> It is no worse than python Eeeeeeeh…
- bjoli 7y agoPython and ruby have about the same speed for most common tasks (or at least in the same ballpark), IE: dirt slow once you leave the comfort of the fast parts of the runtime that are written in C. In reality this is fast enough for most tasks.
- aasasd 7y agoThe thing is, I do some Python programming for money, and I'm having a hard time imagining what the Brew team did to make `brew search` and its other parts so slow. I'd probably have to compare strings byte by byte in Python code for that. Might have to learn me some Ruby just to figure out this mystery.
- bjoli 7y agoThe slowness of brew isnt ruby's fault. They don't keep a local cache of the taps, but instead searches for taps using an API that interfaces with github and searches local taps, remote taps, then blacklisted taps and then probably something more. It is limited by network speed, not by string searching. Edit: explained better here: https://github.com/Homebrew/brew/issues/3056#issuecomment-322314545 https://github.com/Homebrew/brew/issues/3056#issuecomment-32...
- aasasd 7y agoIt's not limited by network speed because I have HOMEBREW_NO_GITHUB_API and HOMEBREW_NO_AUTO_UPDATE enabled. It's not like I just today stumbled into the problem. Brew's not even consuming much system cpu time during `brew search`, despite hogging a core for a full minute. Even just `brew help` takes almost 10 sec cold.
- wilg 7y agoAre you using JRuby or something? 10 seconds is too long. > time brew help > brew help 0.55s user 0.26s system 96% cpu 0.849 total
- aasasd 7y agoRegular Ruby 2.5.1. I do have a throttled CPU due to no battery in the MacBook, but I still have Python and other stuff to compare, and Brew (or Ruby) definitely does something wrong on my machine. It's hugely CPU-bound without a particular reason for being so.
- aasasd 7y agoBy the way, could you please summarize as to what biggest improvements you expect from Ruby that are against Python's policy?
- localhostdotdev 7y agohomebrew's performance is mostly network (git / http / https) and compilation times when needed. also for some reason homebrew really likes to updates its index all the time (I think it got tamed in the newest version), but setting HOMEBREW_NO_AUTO_UPDATE to 1 helps a lot.
- aasasd 7y agoWith HOMEBREW_NO_AUTO_UPDATE and HOMEBREW_NO_GITHUB_API, it still gobbles up a core for a full minute to find a substring in a list of strings. Even if it looks through directories for this, I can't imagine how this task would perform so badly. It's not system cpu time primarily.
- ihuman 7y agoDoes homebrew still download sources and compile them? I thought it moved to only downloading binaries.