News for hackers. Stuff that matters.
Re:Python 3.11 is faster than 3.8 by Shish2k on Wednesday October 26, 2022 @02:23PM (#33347466)
Yeah, I’m really not sure how it managed that. I am slightly suspicious, because while I was working on the zig version I spent more time running into compiler bugs[1] than writing my code, and so there’s a chance that it’s running so fast by throwing away random chunks of important behaviour… but it still passes all of the test suite, so as far as I can tell this specific build is working correctly.

[1] half the time I’d make the compiler crash; the other half it would generate a binary which crashes at runtime, with weird heisenbug behaviour like “adding a print statement to log how far down a function I am causes the code to stop crashing at all” — like right now there is a load-bearing print statement which shows the address of the SDL Window object, because otherwise the compiler seems to optimise the Window out of existence and then a few lines later it segfaults on the null pointer…

Re:Python 3.11 is faster than 3.8 by sirsinsalot on Wednesday October 26, 2022 @04:21PM (#33348858)
> a load-bearing print statement

Is the most glorious thing I ever heard.

Re:Python 3.11 is faster than 3.8 by kristoff_it on Thursday October 27, 2022 @03:56AM (#33354540)
> like right now there is a load-bearing print statement which shows the address of the SDL Window object, because otherwise the compiler seems to optimise the Window out of existence

that sounds like you have undefined behavior in your program