News for hackers. Stuff that matters.
Re:Recent Performance Improvements in Function Calls in CPython by otteromkram on Thursday August 08, 2024 @07:06PM (#41197343)
I don't trust anyone who uses camelCase to write Python. Or, unnecessary while loops.

But, sometimes you can improve built in functions. I found that using a custom (but simple) string-to-int function in golang is a bit quicker than strconv.formatInt() for decimal numbers.

So, there's that.

Python isn't really supposed to be geared towards performance. I like the language, but only see articles like this as resume fodder.

Re:Recent Performance Improvements in Function Calls in CPython by hoten on Thursday August 08, 2024 @07:13PM (#41197396)
Wow, very unfair. It should not be surprising that people writing Python might actually care about performance, even if it isn't so important that they must write their software in assembly.

The code wasn't the authors, and what's more it's just an example to talk about the bytecode. Everyone knows `min(some_list)` is faster and more Pythonic.

This is a very interesting article and probably exposed a few people to a few interesting Python internals.

Re:Recent Performance Improvements in Function Calls in CPython by otteromkram on Thursday August 08, 2024 @07:18PM (#41197427)
I was just referring to the sample code at the top. I should have clarified that and I apologize for the lack of clarity.

But, I would like to see the author use a for loop. I'm not why anyone would use a while loop of they know the constraints.

Re:Recent Performance Improvements in Function Calls in CPython by lacksconfidence on Thursday August 08, 2024 @07:09PM (#41197367)
> but only see articles like this as resume fodder.

Not super important, but i think it's worth calling out. Some of us program because it's fun. We dig into problems like this because it scratches an itch. We share in the hopes of interacting with like-minded individuals. Not everything is about resumes.

Re:Recent Performance Improvements in Function Calls in CPython by sgarland on Thursday August 08, 2024 @09:23PM (#41198018)
Indeed. Some of us do it because we stubbornly want to see just how fast we can make a “slow” language go.
Re:Recent Performance Improvements in Function Calls in CPython by mananaysiempre on Friday August 09, 2024 @01:28PM (#41203776)
Personally I tend to discount the possibility of such motivations for a text once that text is interrupted in the middle to sell me something (which a Substack form counts as).