logoalt Hacker News

dcchamberstoday at 6:00 PM4 repliesview on HN

Does performance not matter?

What if your AI uses an O(n) algorithm in a function when an O(log n) implementation exists? The output would still be "correct"


Replies

keedatoday at 8:25 PM

> Does performance not matter?

No, unfortunately. In a past life, in response to an uptime crisis, I drove a multi-quarter company-wide initiative to optimize performance and efficiency, and we still did not manage to change the company culture regarding performance.

If it does not move any metrics that execs care about, it doesn't matter.

The industry adage has been "engineer time is much more expensive than machine time," which has been used to excuse way too much bloated and non-performant code shipped to production. However, I think AI can actually change things for the better. Firstly, IME it tends to generate algorithmically efficient code by default, and generally only fails to do so if it lacks the necessary context (e.g. now knowing that an input is sorted.)

More importantly though, now engineer time is machine time. There is now very little excuse to avoid extensive refactoring to do things "the right way."

NitpickLawyertoday at 6:26 PM

> Does performance not matter?

Performance can be a direct target in a feedback loop and optimised away. That's the easy part. Taking an idea and poof-ing a working implementation is the hard part.

show 1 reply
paxystoday at 7:11 PM

As it stands today the average engineer is much more likely to ship an unoptimized algorithm than an AI.

simianwordstoday at 6:01 PM

In most cases no. Bottleneck is usual IO.