Hacker News new | ask | show | jobs
by bjoli 2617 days ago
It 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.
2 comments

By the way, could you please summarize as to what biggest improvements you expect from Ruby that are against Python's policy?
> It is no worse than python

Eeeeeeeh…

Python 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.

The 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.

The 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-32...

It'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.

Are 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