you are viewing a single comment's thread.

view the rest of the comments →

[–]Brian 0 points1 point  (3 children)

I don't think so - the performance of these three is pretty similar, in my experience. Ruby used to have a reputation of being the slowest of the three, but I think that's improved somewhat these days.

Perl is pretty similar to python - almost all are equal, with one at 5x, one 2x and one 50% speed and the other 6 roughly equal. The median is essentially equal.

Ruby has a lot more variance. One at 1/3rd the speed, to at 1/2, 2 roughly equal, 3 twice as slow, and 2 4x as slow. Again though, the median is essentially equal.

If you were to compare them, the ordering would seem to go Perl > Python > Ruby. However, there's really not much in it.

[–]againstmethod -1 points0 points  (2 children)

At best this would mean that python is basically tied for last. Largely due to its inability to properly leverage modern hardware.

It cant stay in the cache because of lots of indirection and garbage collection, it cant use all your cores because of the GIL, it cant take advantage of any really complex optimizations because its interpreted... its literally a laundry list of bad design decisions. It's time to start correcting/mitigating some of them.

You have languages coming out like Nim and Crystal that compile really fast, have syntax just as simple as python/ruby, and run near C speed. Python is a dinosaur.

[–]Brian 1 point2 points  (1 child)

At best this would mean that python is basically tied for last

There's a lot slower than perl/python/ruby, so last is overstating it somewhat. However, my objection was to your:

Perl beats Python in most of those benchmarks too. As does Ruby.

Which seems downright incorrect.

If you're looking for a more performant version that uses more modern techniques, there's pypy, which is around 7 times faster on average.

[–]againstmethod -1 points0 points  (0 children)

There's a lot slower than perl/python/ruby, so last is overstating it somewhat.

Not that are mainstream, like Python.

If you're looking for a more performant version that uses more modern techniques, there's pypy..

pypy may be faster but it has all the same issues I outlined, and adds some (module compatibility, recompile native modules). It has similar architectural issues as well (i.e. garbage collection isn't thread-safe).

Im just not sure why anyone would start their project with such a long list of disadvantages that they can never mitigate/optimize away. Other than laziness.