Live data from Hacker News

Faster Python with Guido van Rossum

softwareatscale.dev

171–180 of 251 posts

Re: Faster Python with Guido van Rossum

#171
There seem to be big appreciation for go language.

How difficult is it to develop a language with (mostly) python syntax while keeping the performance of go?

I guess most people who use python use it because of its aesthetics and might even never heard of the GIL issue in python, so i guess among all languages the python syntax is the most liked one.

Re: Faster Python with Guido van Rossum

#172
post #51

I'd be happy with just an optimized strict subset of python that uses type annotations to compile performance critical functions like cython. Mypyc sounds like an attempt at that but doesn't seem to be constraining the language enough to allow it to shed the dynamic nature of the language. Another similar effort was EPython, but it doesn't look like anyone is working on it. I guess Numba would be the closest thing to…

Cinder (https://github.com/facebookincubator/cinder) has Static Python bundled with it, which is pretty useful for replacing Cython.

[disclaimer: I work on Cinder]

Re: Faster Python with Guido van Rossum

#173
post #80

One minor clarification here: Cinder[1] is actually 100% compatible with C extensions (by virtue of being a fork of CPython). [1]: https://github.com/facebookincubator/cinder

Guido appears to have meant to refer to Skybison (https://github.com/facebookexperimental/skybison), which is not 100% compatible.

Re: Faster Python with Guido van Rossum

#174
post #160

Earlier quoted context omitted.

A trap for your dream world were you suddenly get google size ? Because I have a 1 million unique users video streaming service still running python 2.7, using a few servers. The thing has a mobile version serving a different media on the fly, encodes user uploaded videos, features comments, tagging, and even has machine learning detection of content now. It is still maintained by one single person, and he is not a p…

Even faster for 0->1, use Javascript, big ecosystem as Python but same language in front-end and back-end. Faster runtime also.

There are still no "rails" or "django" for JS. There are frameworks emerging with the same features, but they don't have close to the ecosystem. Meaning every time you want auth, social integration, etc. you have to reinvent the wheel.

There is also the stdlib. JS doesn't have simple things built in like left trim a string, csv loading, uuid generation, etc.

Then there is the API. Sorting in JS requires this weird -1/1 function. Getting the last element or truthiness to manipulate length.

Suddenly not only you have to install tons of things, but libs and frameworks can't rely on a common ground, nothing seems to integrate well. You glue a lot of things manually.

The popularity of JS is because it has a monopoly on the browser, and so a lot of people must use it, and a lot of users know it by default, and look for it elsewhere.

But when you have Ruby, Python, or even modern PHP frameworks in front of it, it's not a great deal.

Of course, not all programming tasks are about the Web. And this is where JS collapses completely. Sysadmin, data analysis, pen testing or automation using JS is a pain compared to the fluent versatility of alternatives. You know, things like connect to this ftp, download the excel files every hour, put the average of every column in the mysql db then export the thing as a PDF and send that to the boss.

Re: Faster Python with Guido van Rossum

#175

Ugh. Python could be fast, but the python core team / GvR put so many ridiculous constraints on what can change that maybe at best it gets like 10% faster, some day. Anything meaningful means breaking compatibility with extensions, and they absolutely won't do that. I feel like GvR got burned in the python 2->3 transition, but he learned the wrong lesson. The lesson he seemed to learn was never break compatibility bu…

There is no way I'm doing anything serious in a language that decides to make us rewrite part of our work regularly. We have actual work to do... I think you underestimate how important stability is.

What if your language got 100x faster? What if deployment became trivial? Would that be incentive enough? I would take annoying breakages for that.

Re: Faster Python with Guido van Rossum

#176

Earlier quoted context omitted.

Did you look at the source of the programs where Python was competitive? Python basically using C types and GMP to write C in Python...

I suspect that site is some kind of in-joke. E.g. read the regex-redux example in say c#, now look at the go version, now the python version… It’s not really what you’d expect for a site called computer language benchmarks game. Each example just calls out to a very fast c library (pcre2) to perform the heavy lifting regardless of which language is being “benchmarked”. Seems a pretty pointless site. The other example…

On this page: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

> "... a pretty solid study on the boredom of performance-oriented software engineers grouped by programming language."

I think that's probably the best way to describe it.

Re: Faster Python with Guido van Rossum

#177
post #4

I have become increasingly convinced Python as a language is a "trap" for any use of notable scale, be the scale about number of developers, codebase size, or performance requirements. It's a great 0->1 language and great at simple glue, but eventually you hit a wall and have to keep investing larger and larger amounts of people or computing resources to get continued returns... all due to fundamental design decision…

To add to this: any time somebody at my company who doesn't work on our Python services every day has to dip into them for a one-off task, it takes a day or two of troubleshooting their environment just to get to where they can start working with the actual code. And this isn't necessarily from scratch: any Python environment that's sat still for more than a few weeks becomes inevitably broken. It's a huge time-sink and I have to think it offsets any other productivity gains that Python may be giving us.

Personally I refuse to touch our Python services with a ten-foot pole. My local app hits the testing environment and that's that.

Re: Faster Python with Guido van Rossum

#178
post #122

Earlier quoted context omitted.

Did you look at the source of the programs where Python was competitive? Python basically using C types and GMP to write C in Python...

> Did you look at the source of the programs… Did you? :-) That Node pidigits program also uses GMP. Besides those 2, did you notice other JS programs not 50x faster than the corresponding Python programs ?

I never made the assertion JS is 50x faster...

But everyone knows it is significantly faster than Python. Probably at least a few times for pure JS vs. pure Python programs. Not that it matters, Python is basically glue to run mostly C and C++ programs.

Re: Faster Python with Guido van Rossum

#179
post #122

Earlier quoted context omitted.

Did you look at the source of the programs where Python was competitive? Python basically using C types and GMP to write C in Python...

> Did you look at the source of the programs… Did you? :-) That Node pidigits program also uses GMP. Besides those 2, did you notice other JS programs not 50x faster than the corresponding Python programs ?

There are 2 programs there that are 50x faster in JS, other 40x, other 35x, other 16x, a couple 7x, not sure what are you arguing about.

Re: Faster Python with Guido van Rossum

#180
post #127

Earlier quoted context omitted.

> It's a great 0->1 language and great at simple glue, but eventually you hit a wall and have to keep investing larger and larger amounts of people or computing resources to get continued returns... If you're a millionaire by that time, or have a strong established business, then it doesn't matter, it's a nice problem to have. Have your engineers have a go at it. See: Dropbox, Disqus, AirBnB, and others... And if you…

Also, pretty sure Python was called out as one of the main reasons why some hundred of Google Video engineers couldn't keep up with YouTube prior to Google's purchase. Python might not be the most performant, but once you need the scale, it's a good problem to have because at that point, your product has already made it.

Do you have an article about that? I would be interested to learn more about it.
Post reply on HN