Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

561–570 of 579 posts

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

#561

Earlier quoted context omitted.

30 years ago, right before Windows 95 came out, Windows was a 16-bit OS and the modern versions of Windows no longer support 16-bit programs. PCIe came out only in 2003, and I don't know that PCIe slots can support PCI. SATA is also from 2003. Even USB originally came out in 1996, and the only pre-USB connector slot I have on my computer is a PS/2 port (which honestly surprises me). For monitor connections, VGA and D…

Python programs do not care about SATA/PCI-E.

Some do, most don't. (Don't generalize)

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

#562
post #70
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…

Cool story, but was your life really at risk in that situation?

At risk of not being programming?

Seemingly.

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

#563
post #509

Earlier quoted context omitted.

At least Python doesn't have an extremist "100% Pure" ideology like Java, and instead (like TCL and Lua) it's been designed from the ground up for easily integrating with other languages and libraries, embedding, and extending, instead of Java's intolerantly weaponized purity and linguistic supremacy. Reasons why Sun and Java failed: Strategy over product. McNealy cast Java as a weapon of mass destruction to fight Mi…

Sun and Java failed ? Please share your example of what succeeded (maybe just spell out the last paragraph).

[deleted]

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

#564
post #521

Earlier quoted context omitted.

> 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…

The biggest source of incompatibility isn't in the programming languages. It's either in the specifications ("hmm maybe one byte isn't enough after all for a character, let's break all those assumptions") or in the hardware ("maybe 16 bits isn't enough of address space").

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

#565

Earlier quoted context omitted.

That, or it's just collective reality taking its toll. Doesn't have to be an organised campaign of bots - can also just be fans of the idea across a diverse set of humanity. If you think that doesn't happen organically, take another look at the site you're on.

An example is how during the election their was so many comments saying they won't vote for Kamala because of the genocide in Gaza. This is a deeply illogical position that directly helped Trump win and was very likely promoted by Russian bot farms.

Well, logically, there really were a significant portion of the population who in fact were not okay with what they were seeing in Gaza, from the very beginning.

Your "its the Russians" is just matroska-izing the real issue, which is that the people don't have a voice, in your mind, if the political viewpoint doesn't match a world view in which "the Russians are the bad guys".

The genocide of Gaza was been hugely unpopular since the very beginning.

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

#566

Earlier quoted context omitted.

An example is how during the election their was so many comments saying they won't vote for Kamala because of the genocide in Gaza. This is a deeply illogical position that directly helped Trump win and was very likely promoted by Russian bot farms.

Well, logically, there really were a significant portion of the population who in fact were not okay with what they were seeing in Gaza, from the very beginning. Your "its the Russians" is just matroska-izing the real issue, which is that the people don't have a voice, in your mind, if the political viewpoint doesn't match a world view in which "the Russians are the bad guys". The genocide of Gaza was been hugely unp…

"there really were a significant portion of the population who in fact were not okay with what they were seeing in Gaza,"

I'm not saying there wasn't. BUT the extreme consistency of the people commenting about it on sites like Reddit combined with the fact that it ultimately ends up helping Trump get elected makes me update my Bayesian estimate that Russia and/or the GOP is behind a lot of them. You saw the same thing in 2015 with all the "Hillary will start world war 3" posts. Those weren't organic at all. You see it in every US presidential election since Hillary v Trump: Many "people" making very similar posts about some reason why democrats or liberals shouldn't vote for the Democratic candidate. This works because voter turnout is what wins or loses elections.

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

#567

Earlier quoted context omitted.

The former CIA director is not, at all, someone who can be trusted. They don't present their evidence, either. Anyone in a position of authoritarian power can say anything . Until it's prosecuted in an open court of law, all bets are off. Hysteria is easily promoted by anyone in the world - even American companies are capable of it - and there is much profit to be made from Russophobia, especially in the heinous mark…

Stop gaslighting me

So you don’t believe in a free and open society, got it ..

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

#568
post #504

Earlier quoted context omitted.

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 requ…

You appear to have been traumatized by Java... You can sub in any statically typed, compiled language.

The key distinction between multiprocessing and multithreading is that in multithreading all the threads of a process share the same memory. Are you saying that Python uses pipes for providing shared access to memory across processes? It looks like there is: multiprocessing.shared_memory, but this all seems more complicated than it is in other languages. Perhaps it's not?

I will 100% give you that Python has more libraries, but that's the only real advantage I was able to glean.

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

#569
post #568

Earlier quoted context omitted.

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 requ…

You appear to have been traumatized by Java... You can sub in any statically typed, compiled language. The key distinction between multiprocessing and multithreading is that in multithreading all the threads of a process share the same memory. Are you saying that Python uses pipes for providing shared access to memory across processes? It looks like there is: multiprocessing.shared_memory, but this all seems more com…

No im saying that you can transport data over unix sockets, which are in memory, and python has that as part of multiprocessing.

The way python multiprocessing is set up is that it acts like a thread - when you launch a function, it copies the memory of the current process into the new one. You pay the startup overhead, so instead you launch worker processes ahead of time, and transport data to them over unix pipes. Pretty much almost as fast as threading.

>You appear to have been traumatized by Java

Not really, I just have standards. Java is just a poorly designed language with poor community support. Look at the amount of code it takes to send an HTTP request in Java, versus Python.

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

#570
post #568

Earlier quoted context omitted.

You appear to have been traumatized by Java... You can sub in any statically typed, compiled language. The key distinction between multiprocessing and multithreading is that in multithreading all the threads of a process share the same memory. Are you saying that Python uses pipes for providing shared access to memory across processes? It looks like there is: multiprocessing.shared_memory, but this all seems more com…

No im saying that you can transport data over unix sockets, which are in memory, and python has that as part of multiprocessing. The way python multiprocessing is set up is that it acts like a thread - when you launch a function, it copies the memory of the current process into the new one. You pay the startup overhead, so instead you launch worker processes ahead of time, and transport data to them over unix pipes.…

> it copies the memory of the current process into the new one

And if that memory is large enough then you OOM, so you would have to manage shared memory separately to prevent it from being copied into each process. It's not impossible, just complicated for some use-cases where using threads is a preferable paradigm.

> Look at the amount of code it takes to send an HTTP request in Java, versus Python

This is kind of my point.... (Java)

    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder().uri(URI.create("https://api.example.com/data")).build();
    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
versus (Python)

    response = requests.get('https://api.example.com/data')
Yes, it's more verbose, but not to the extent that I'd trade the compiler and performance for the less verbose version especially considering auto-complete in IDEs.
Post reply on HN