News for hackers. Stuff that matters.
Re:Python 3.11 beta vs. 3.10 benchmark by bjourne on Wednesday May 18, 2022 @09:27AM (#31422497)
Other languages do this by sacrificing correctness. If a() calls b() calls c() causes an exception Python will show you the correct callstack. In other languages the callstack will differ depending on whether the compiler decided to inline c() or b() in a(). Same thing with TCO, it destroys callstacks and is therefore incorrect. If one prefers correctness over performance one should use Python. If one doesn't mind sacrificing correctness to gain performance one can use other languages.
Re:Python 3.11 beta vs. 3.10 benchmark by kaba0 on Wednesday May 18, 2022 @02:49PM (#31426272)
I’m not sure what language do you mean but Java has observable call stacks and inlines just fine. With JIT, deoptimizations are possible. But sure, for AOT languages it may happen, though stacks there are mostly meaningful only with debug symbols.
Re:Python 3.11 beta vs. 3.10 benchmark by bjourne on Wednesday May 18, 2022 @04:24PM (#31427188)
The vast majority of languages that support inlining do not reconstruct callstacks. Java is one of few exceptions and, like Python, it does not support tco.
Re:Python 3.11 beta vs. 3.10 benchmark by planede on Wednesday May 18, 2022 @09:29AM (#31422512)
Not all languages make call stacks observable.