Live data from Hacker News

Python 3.13 Gets a JIT

tonybaloney.github.io

531–540 of 553 posts

Re: Python 3.13 Gets a JIT

#531

Earlier quoted context omitted.

It’s because the total dollars of capitalized software deployed in the world using Python has absolutely exploded from AI stuff. Just like how the total dollars of business conducted on the web was a big driver of JS performance earlier.

When Node.js started really taking off, I was actually a bit worried that Python would become No Longer Best Practice, but now it definitely seems to be still going strong.

Python is Best Practice (tm)? What do you mean?

Re: Python 3.13 Gets a JIT

#532

If python became fast, there's a chance it may become a language eater.

IMO the biggest issue with Python right now is the greater culture of code quality. This is probably biased from my recent exposure to ML code and ML packages. But there is a disgusting level of disregard for basic code practices in even fairly well funded libraries. Dead code, commented-out code, unused variables, unused imports, inconsistent quote types, unreadable variable names, no attempt to use type hints, etc.

Granted, the code I see from more web and ops focused teams is miles better. But I worry the collective is not where it should be.

Re: Python 3.13 Gets a JIT

#533

It's interesting to see these 2-9% improvements from version to version. They are always talked about with disappointment, as if they are too small, but they also keep coming, with each version being faster than the previous one. I prefer a steady 10% per version over breaking things because you are hoping for bigger numbers. Those percentages add up!

This is happening mostly because Guido left, right? The take that CPython should be a reference implementation and thus slow always aggravated me (because, see, no other implementation can compete because every package depends on CPython kirks, in such a way that we're now removing the GIL of CPython rather than migrating to Pypy for example)

As a compiler, python is an optimized (C/kernel) implementation of parse generation. JIT (PyPy) is a method that parses a 'trace' variation of grammar instead of syntax, where the optimizer compiles source objects that are not limited to python code.

It's goal is to create as many 'return' instructions as it can decide to.

GIL is merely a CPython problem but synchronization can also be a compilation problem.

Re: Python 3.13 Gets a JIT

#534
post #468
post #343

I wish the money could be spent on PyPy but pypy has its problems - you don't get a big boost on small programs that run often because the warmup time isn't that fabulous. For larger programs like you sometimes it some incredibly complicated incompatibility problem. For me bitbake was one of those - could REALLY benefit from pypy but didn't work properly and I couldn't fix it. If this works more reliably or has a fas…

Isn’t that similar to JS? My understanding was modern JS runtimes had something like this: interpreted -> basic JIT -> fancy JIT The interpreter gets you going fast. The basic JIT is extremely fast to compile but not the most performant. If the code can be JITed it quickly will be. From there the engine can find hotspots or functions that get run a lot and use the fancy JIT on them in the background. That means the s…

figure 7 "Speculation in JavaScriptCore" 2020 Filip Pizlo

https://webkit.org/blog/10308/speculation-in-javascriptcore/

Re: Python 3.13 Gets a JIT

#536
As great as such improvements are. Isn't it concerning for the future of Python's freedom that the president of the PSF is a Microsoft employee and a lot of important core devs are nowadays MS employees? Doesn't this give MS a great lever in the future the steer Python wherever they want it to be?

Re: Python 3.13 Gets a JIT

#537

Earlier quoted context omitted.

Heard of him; he's done a lot of stuff. So is he the Bourbaki of software? https://en.m.wikipedia.org/wiki/Nicolas_Bourbaki

While I'm sure some people theorize that Fabrice Bellard is actually a pseudonym of a collective of 10x programmers, he is as far as I know just one person.

He he, I forgot to add a wink at the end of my question above.

Re: Python 3.13 Gets a JIT

#538

Earlier quoted context omitted.

Compunding a decrease works differently than an increase. If something gets 10% faster twice it actually got 19% faster. In other words, the runtime is 90% of 90%, i.e. 81%.

> If something gets 10% faster twice it actually got 19% faster 21%, not 19%. It is 1.1 * 1.1 = 1.21 You are right in the opposite direction. If it got 10% slower, then it is 0.9 * 0.9 = 0.81 = 19% slower

It's easy to see there must be something wrong with this since if you get 10% faster 8 times, we can be sure that this doesn't mean you're 114% faster (1.1^8 = 2.14). You can't get more than 100% faster!

When you say something is 10% faster, what you mean is it took 10% less time to finish. So 19% is correct.

Re: Python 3.13 Gets a JIT

#539
post #452
post #421

Earlier quoted context omitted.

ABCL runs on the JVM. It generates JVM byte code, which then can be JIT compiled by the JVM. CLISP has a byte code machine, for which a JIT can be used. There might be others.

thank you! i didn't know clisp had a jit compiler, and i certainly should have thought of abcl, and also you mentioned them in your other comment in https://news.ycombinator.com/item?id=38933091 how much of a performance boost does abcl get from the hotspot jit compared to, say, interpreted clisp

I have not made any performance comparison.

Re: Python 3.13 Gets a JIT

#540
post #519
post #343

I wish the money could be spent on PyPy but pypy has its problems - you don't get a big boost on small programs that run often because the warmup time isn't that fabulous. For larger programs like you sometimes it some incredibly complicated incompatibility problem. For me bitbake was one of those - could REALLY benefit from pypy but didn't work properly and I couldn't fix it. If this works more reliably or has a fas…

PyPy dev here. A little money could go along way to speeding up the PyPy base interpreter. Right now PyPy has no active income.

Thank you for the great work you've all done.
Post reply on HN