Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

521–530 of 579 posts

Re: Python 3.14 is here. How fast is it?

#521
post #508

Earlier quoted context omitted.

> Mathematical notation evolved a lot in the last thousand years That is not counter to what I'm saying. Mathematical notation Programming Languages. Proofs Code. When mathematical notation evolves, old proofs do not become obsolete! There is no analogy to a "breaking change" in math. The closest we came to this was Godel's Incompleteness Theorem and the Cambrian Explosion of new sets of axioms, but with a lot of wor…

> When mathematical notation evolves, old proofs do not become obsolete! There is no analogy to a "breaking change" in math. I disagree. The development of non-euclidean geometry broke a lot of theorems that were used for centuries but failed to generalize. All of a sudden, parallels could reach each other. > Can we write a family of nested programming languages where core features are guaranteed not to change in bre…

> Should it be memory-efficient? Fast? Secure? Simple? Easy to formally prove? Easy for beginners? Work on old architecture? Work on embedded architecture?

What do any of these have to do with guarantees of long-term compatibility? I'm not arguing that there should be One Programming Language To Rule Them All, I'm asking about whether we can design better guarantees about long-term compatibility into new programming languages.

Re: Python 3.14 is here. How fast is it?

#522
post #10

Tangential, but I practically owe my life to this guy. He wrote the flask mega tutorial in what I followed religiously to launch my first website. Then right before launch, in the most critical part of my entire application; piping a fragged file in flask. He answered my stackoverflow question, I put his fix live, and the site went viral. Here's the link for posterity's sake https://stackoverflow.com/a/34391304/41802…

> flask Off-topic, but I absolutely loathe new Flask logo. Old one[0] has this vintage, crafty feel. And the new one[1] looks like it was made by a starving high schooler experimenting with WordArt. [0] - https://upload.wikimedia.org/wikipedia/commons/3/3c/Flask_lo... [1] - https://flask.palletsprojects.com/en/stable/_images/flask-na...

Counterpoint: The old logo looks like it's for a piece of software that stopped being maintained 15 years ago

Re: Python 3.14 is here. How fast is it?

#523
post #10

Tangential, but I practically owe my life to this guy. He wrote the flask mega tutorial in what I followed religiously to launch my first website. Then right before launch, in the most critical part of my entire application; piping a fragged file in flask. He answered my stackoverflow question, I put his fix live, and the site went viral. Here's the link for posterity's sake https://stackoverflow.com/a/34391304/41802…

You have made my day, sir. :)

You got me into web dev. Thank you!

Re: Python 3.14 is here. How fast is it?

#525
post #511
post #483

Earlier quoted context omitted.

> There's no reason we can't be writing code that lasts 100 years. Code is just math. The weather forecast is also “just math”, yet yesterday’s won’t be terribly useful next April.

No, weather forecasting models are "just math". The forecast itself is an output of the model. I sure hope our weather forecasting models are still useful next year! weather forecasting models code math weather forecast program output calculation results So all you're saying is that we should not expect individual weather forecasts, program output, and calculation results to be useful long-term. Nobody is arguing tha…

That's why I said "[yesterday's] weather forecast" and not "weather forecast models".

But my larger point actually also stands: Weather forecast models also, in the end, incorporate information about geography, likely temperature conditions etc., and might not be stable over 100 years.

The more interesting question is probably: Is Python more like the weather or a weather forecasting model? :)

Re: Python 3.14 is here. How fast is it?

#526
post #504

Earlier quoted context omitted.

You can run Python processes in parallel for "scaling". Youtube and Uber run python backends. This is cheaper than developer time per hour.

Sure, there's multiprocessing, but historically no multithreading (relatively recently there is the free-threading interpreter). Each of those processes / threads will also execute slowly compared to most other languages. But we agree Python is not performance oriented... I'm just curious why people think it's a good trade-off when I suspect that writing the same code in say, Java, will take roughly the same time, be…

After having worked with Java extensively during my time at Amazon, especially during the log4shell bullshit, I can safely say that if you think Java is viable for anything these days, you lack real world experience of how actual good, efficient dev process is one.

But on a slightly less edgy note: java doesn't have a fast REPL loop, near anywhere near the amount of libraries available for it as Python does, and requires tuning to actually make it performant. Its by far not the same amount of time to develop. It doesn't have things like jupyter notebooks for prototyping, doesn't have an easy to use interpreter, doesn't have ability to inject code during debug sessions, and doesn't have easy system integration (i.e with a module, you can install it in editable more, you can have an executable you can run from command line, e.t.c), and doesn't have things like dynamic import (where you can dynamically reload modules as the program is running, can't (easily) import inside function statements, and so on)

>Sure, there's multiprocessing, but historically no multi-threading

Functionally, when the cpu switches context the main thing that matters is the stack frame. This happens in both threading or running multiprocessing. The only difference is between the two is a) data access and b) initial startup time.

a is solved by unix pipes,which is already a part of multiprocessing in python, which are plenty fast for anything you wanna do, and b is solved by spinning up the processes ahead of time in worker pools, which is already part of multiprocessing in python.

Re: Python 3.14 is here. How fast is it?

#527
post #485

Earlier quoted context omitted.

> Without version numbers, it has to be backwards-compatible If there’s one thing that mathematical notation is NOT, it’s backwards compatible. Fields happily reuse symbols from other fields with slightly or even completely different meanings. https://en.wikipedia.org/wiki/Glossary_of_mathematical_symbo... has lots of examples, for example ÷ (division sign) Widely used for denoting division in Anglophone countries, i…

> Fields happily reuse symbols from other fields with slightly or even completely different meanings. Symbol reuse doesn't imply a break in backwards compatibility. As you suggest with "other fields", context allows determining how the symbols are used. It is quite common in all types of languages to reuse symbols for different purposes, relying on context to identify what purpose is in force. Backwards incompatibili…

> Mathematical notation from long ago doesn't much look like what we're familiar with today, but we can still make use of it.

But few modern mathematicians can understand it. Given enough data, they can figure out what it means, but that’s similar to (in this somewhat weak analogy) running code in an emulator.

What we can readily make use of are mathematical results from long ago.

Re: Python 3.14 is here. How fast is it?

#528
post #10

Tangential, but I practically owe my life to this guy. He wrote the flask mega tutorial in what I followed religiously to launch my first website. Then right before launch, in the most critical part of my entire application; piping a fragged file in flask. He answered my stackoverflow question, I put his fix live, and the site went viral. Here's the link for posterity's sake https://stackoverflow.com/a/34391304/41802…

> flask Off-topic, but I absolutely loathe new Flask logo. Old one[0] has this vintage, crafty feel. And the new one[1] looks like it was made by a starving high schooler experimenting with WordArt. [0] - https://upload.wikimedia.org/wikipedia/commons/3/3c/Flask_lo... [1] - https://flask.palletsprojects.com/en/stable/_images/flask-na...

Is it just me or there has never been a single logo update in history that actually improved a logo?

An once whimsical corner of web development has lost its charm due to arbitrary trends.

Re: Python 3.14 is here. How fast is it?

#529

Earlier quoted context omitted.

I used MATLAB for about 5 years, and then Mathematica, before switching to Python. I even had a job offer to work at MathWorks in Cambridge in about 2014!

And you still think Python has superior matrix manipulation syntax? Because that's at the core of scientific computing.

I think the syntax isn’t that important if I’m totally honest! The library support and ecosystem is much more useful to me than it ever was in MATLAB and tbh I use np.einsum for anything tricky and because performance is better anyway.

Re: Python 3.14 is here. How fast is it?

#530

Earlier quoted context omitted.

*for very specific benchmarks, not "on average"

True, Python could be better or worse than two orders of magnitude slower for your particular use case, but it's 70x slower for recursion and addition that it clearly hasn't special-cased. That's good to know.

Well, if that's good to know --

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Post reply on HN