Hacker News new | past | comments | ask | show | jobs | submit login

Python is fast compared to something? Maybe fast enough to generate HTML.



Fast enough for YouTube, Instagram, and Dropbox. If you need to scale up bigger than that then maybe reach for something else I guess.

Today's HN launch of FastHTML's home page was running on a $5/month hobbyist account at Railway.app, where it averaged 1% utilization of 1 VCPU.

(The trick, as always, is to optimise the inner loops in your app as needed; often that just means using pre-existing fast libs for that bit, but sometimes you may need to reach for cython/PyO3/etc. Often you'll find you don't need anything extra. FastHTML's own home page doesn't need anything extra.)


YouTube instagram and Dropbox definitely don’t scale thanks to python. They scale thanks to the massive infrastructure they built around some python code. Cdn caches etc. we all know this. And they could probably save money by migrating to a more performant and safe language. But they have money firehoses and household brand recognition so they don’t care.


> YouTube instagram and Dropbox definitely don’t scale thanks to python

But python doesn't prevent them from scaling either ;)


> Cdn caches etc. we all know this.

No matter what language you use, you use CDNs and caches.


They could partly run Python, in which case it would be a better example of FastHTML scaling in this way. Some CDNs have Python edge functons: https://developers.cloudflare.com/workers/languages/python/ https://aws.amazon.com/developer/application-security-perfor...

With Vercel and Netlify it's just TypeScript/JavaScript: https://vercel.com/docs/functions/edge-middleware https://docs.netlify.com/edge-functions/overview/


Python is glue, used to call and integrate other faster languages. Most of what is done with Python is calling fast C and C++ code.

Back in ancient times, a software project I was working in, failed, precisely because of Python performance with the Zope framework, it was too slow to render a webpage that required more than a few interesting calculations.

Today the language is almost the same, but computers have a thousand times more memory, and the CPUs are similarly faster.

The exact same project would have been successful today, just like neural networks are cornerstones of modern computing, because of the advances in hardware.


I never expected this quick jab to trigger such reactions.

Yes, it’s glue. True for Ruby, PHP, Perl as well.

I just think it’s disingenuous to associate the word “fast” with anything implemented with it, granted that C is 70 times faster than it. I mean, me saying it’s slow compared to C is less hyperbolic than saying it’s fast.

And I think Python is perfectly adequate for plenty of use cases, so is PHP, so is Ruby. I like to be mean to JavaScript, but even that is fine for web dev.


Not just fast, but webscale. Also fast to develop.

https://youtu.be/b2F-DItXtZs?si=r6vGxl22gXkXO1Y7


ROI is more important than silly benchmarks.

https://www.tiobe.com/tiobe-index/

But, we can play the benchmark game, if that tops your morning cereal.

Competes with Go. Blows most popular TS frameworks out of the water.

https://www.techempower.com/benchmarks/#section=data-r22&hw=...

For you: https://gprivate.com/6chku


That benchmark makes Go look good, and JS very good. The upper part of the table belongs to Go, and the very top is JS.

The bottom of the benchmark table are all slow Python implementations xD


fast enough for a million users on a $4 budget.

When you get to 1% of the world population, you can switch to rust/go




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: