Live data from Hacker News

Python: The Optimization Ladder

cemrehancavdar.com

141–150 of 154 posts

Re: Python: The Optimization Ladder

#141

nbody spectral-norm C 2100ms 400ms Graal 211ms 212ms PyPy 98ms 1065ms Seeing Graal and Pypy beat the gcc C versions suggests to me there's something wrong with the C version. Perhaps they need a -march=native or there's something else wrong. The C version would be a different implementation in the benchmark game, but usually they are highly optimised. Edit: looking at [1] the top C version uses x86 intrinsics, perhap…

I've checked some run times on my M1 mac mini, and have realised the C run time of 2.1s for n-body is the figure from the benchmark game itself, which is 50 million iterations on a very old i5. It would have made sense if they'd run the C version on their M4 pro and used the same number of iterations to get a true comparison there. Obviously the main point of the article is to compare different python optimisations,…

Here are a few naive un-optimised single-thread #8 programs transliterated line-by-line literal style into different programming languages from the same original.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: Python: The Optimization Ladder

#142
> "The Benchmarks Game problems are pure compute: tight loops, no I/O, no data structures beyond arrays."

iirc reverse-complement reads and writes a GB, fasta and mandelbrot write, regex-redux reads, k-nucleotide reads and uses a hash table.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: Python: The Optimization Ladder

#143
post #125
post #82

Earlier quoted context omitted.

Never heard of this language, but it looks interesting. Very modern, certainly. One thing that stood out to me is that there's apparently the ability to write a bare `for` loop...? Is that just equivalent to while (true) in other languages?

It does have a "shady" past, but AFAIK it mostly managed to leave that vaporware behind. Nonetheless, I would not bet anything too serious on such a small language.

I will not be commenting on the topic here because of a consistent pattern of downvoting:

https://x.com/arundsharma/status/2033635906532638776

You should judge the language based on its license and what it does, not on the morality of people who wrote it and sponsored it.

Either produce an alternative language which does the same thing written by more "unshady" people and supported by a large corporation (talking about the "small language" comment here).

These human emotions won't matter in 6 months as code will be increasingly written by machines which have no such considerations.

Re: Python: The Optimization Ladder

#144
post #126

Earlier quoted context omitted.

Cython and all the libs you mention use the c-api, which is the #1 thing python needs to lose to be competitive. I wish someone writes a stdlib without using it. My attempt from a few months ago in a repo under the py2many org.

> Cython and all the libs you mention use the c-api, which is the #1 thing python needs to lose to be competitive. Quite hard to lose the #1 reason people use the language for.

The #1 reason people use it is because it allows you to focus on the problem you're solving rather than the syntax, memory management or some other aspect.

Most people don't even know what C-API is or why it slows things down.

Compatibility is made into a bigger deal than it is. That's the COBOL argument.

I wish the python community focused more on why openclaw and opencode are getting written in typescript, not python.

Why aren't agents more efficient at translating python code into shippable end user binaries using fast interpreted -> compiled agentic loops and attempt memory safety only for binaries/libraries with a large distribution.

Re: Python: The Optimization Ladder

#146

I must admit that I'm amused by the people who find the writeup useful but are turned off by the AI "smell". And look forward to the day when all valued content reeks of said "smell"; let's see what detractors-for-no-good-reason do then (yes I'm a bit ticked by the attitude).

Isn't this a depressing thought? Regardless of AI, to think that everything we read would come in the same literary style, conveying little of the author, giving no window through which to learn about who they are -- that would be a real loss.

Not at all depressing. If authors/creators want readers/consumers to know who they are, then they'll do so in whatever way they consider acceptable to them.

Re: Python: The Optimization Ladder

#147
post #45

I must admit that I'm amused by the people who find the writeup useful but are turned off by the AI "smell". And look forward to the day when all valued content reeks of said "smell"; let's see what detractors-for-no-good-reason do then (yes I'm a bit ticked by the attitude).

Why is it amusing? How can you suppose that this is not a good reason to object, especially days after https://news.ycombinator.com/item?id=47340079 ? I find the style so reflexively grating that it's honestly hard for me to imagine others not being bothered by it, let alone being bothered by others being bothered. Especially since I looked at previous posts on the blog and they didn't have the same problem .

It's amusing because it's essentially "much ado about nothing". It's also contradictory, as the claim is AI "slop" destroys value, yet here is a case - and I'm pretty sure there are others - where value isn't destroyed, which destroyed said claim. The problem isn't the use of AI for generating/fixing content; it's the publishing of bad content, which AI magnifies, as out magnifies other things.

Re: Python: The Optimization Ladder

#148

I must admit that I'm amused by the people who find the writeup useful but are turned off by the AI "smell". And look forward to the day when all valued content reeks of said "smell"; let's see what detractors-for-no-good-reason do then (yes I'm a bit ticked by the attitude).

The smell makes me suspicious because I don’t know how the author used AI. If the author wrote a detailed rough draft, had AI edit, reviewed the output thoroughly, and has the domain knowledge to know if the AI is correct, then this could be a useful piece. I suspect most authors _don’t_ fall in that bucket.

It's already established that the piece is useful but several readers. There's no detracting from that. Why does the process matter so much as soon as AI comes in the picture?

Re: Python: The Optimization Ladder

#149

I must admit that I'm amused by the people who find the writeup useful but are turned off by the AI "smell". And look forward to the day when all valued content reeks of said "smell"; let's see what detractors-for-no-good-reason do then (yes I'm a bit ticked by the attitude).

> detractors-for-no-good-reason It's partly just a matter of taste; we can disagree on whether that's a good reason, but I'd be surprised if there were no writing styles that you personally find offputting. The LLM smell is also a signal of low effort, and a signal that we as readers can't rely on our usual heuristics for judging credibility. The whole thing with LLMs is that they're great at producing polished, plau…

> signal of low effort

Is low effort really a valuable signal though? Or is it what's actually in the content that's valuable? Like here readers are literally saying that they found the content valuable "but AI smell". Why is there a "but"? Would there be a similar issue if the author had contracted a human assistant to do X? Definitely not, and I see no reason why the treatment should be different for AI.

Re: Python: The Optimization Ladder

#150
post #125

Earlier quoted context omitted.

It does have a "shady" past, but AFAIK it mostly managed to leave that vaporware behind. Nonetheless, I would not bet anything too serious on such a small language.

I will not be commenting on the topic here because of a consistent pattern of downvoting: https://x.com/arundsharma/status/2033635906532638776 You should judge the language based on its license and what it does, not on the morality of people who wrote it and sponsored it. Either produce an alternative language which does the same thing written by more "unshady" people and supported by a large corporation (talking abo…

Shady people is one thing, marketing a language with impossible claims is another.

People got interested in the language over wildl claims that are simply CS-wise impossible. Later, these were removed from the site and you are left with a.. not too interesting language. I'm judging it on this late phase, with a bad taste in my mouth from the former shenanigans.

> in 6 months as code will be increasingly written by machines

Come on..

Post reply on HN