News for hackers. Stuff that matters.
Re:Faster CPython (2021) [pdf] by xigoi on Sunday January 23, 2022 @02:54PM (#30049827)
Speed of code and speed of development are not mutually exclusive.
Re:Faster CPython (2021) [pdf] by coldtea on Sunday January 23, 2022 @03:24PM (#30050095)
They force different tradeoffs to be made in languages but also in development, so they kind of are.

Obviously: if speed of development and speed of program were non-problematically compatible, everybody would always go for both (why lose speed, if you can have the same development experience)? But speed requires several things, like more careful algorithms and program design, custom solutions instead of one-size-fits-all libraries and frameworks, more care regarding memory usage, time spend for optimization, use of a statically typed language as opposed to a higher level scripting one, slower build/jit times (as opposed to interpreter), and so on...

Re:Faster CPython (2021) [pdf] by xigoi on Monday January 24, 2022 @06:06PM (#30065377)
Statically typed languages can be high level. That was my main point. You can get a 100× speedup just by using Nim, Crystal, Go, … instead of Python.
Re:Faster CPython (2021) [pdf] by mypalmike on Monday January 24, 2022 @01:34AM (#30054294)
Garbage collection is an example (probably the most critical current example) where there is a concrete trade-off between the two.
Re:Faster CPython (2021) [pdf] by kaba0 on Monday January 24, 2022 @03:45AM (#30054955)
Garbage collectors are not bottle necks at all, hell, for highly dynamic allocation patterns they beat malloc implementations out of the water in performance.

Of course one should not spam them needlessly, but that’s why value classes are important.

Re:Faster CPython (2021) [pdf] by mypalmike on Monday January 24, 2022 @11:41AM (#30060074)
"Comparing runtime, space consumption, and virtual memory footprints over a range of benchmarks, we show that the runtime performance of the best-performing garbage collector is competitive with explicit memory management when given enough memory. In particular, when garbage collection has five times as much memory as required, its runtime performance matches or slightly exceeds that of explicit memory management. However, garbage collection’s performance degrades substantially when it must use smaller heaps. With three times as much memory, it runs 17% slower on average, and with twice as much memory, it runs 70% slower. Garbage collection also is more susceptible to paging when physical memory is scarce. In such conditions, all of the garbage collectors we examine here suffer order-of-magnitude performance penalties relative to explicit memory management."

https://www.cs.tufts.edu/comp/150FP/archive/emery-berger/gc-...

Re:Faster CPython (2021) [pdf] by xigoi on Monday January 24, 2022 @06:09PM (#30065428)
Still, a good GCed language will be much faster than Python, especially when not under such memory constraints.